Stellar PHP SDK API Documentation

SEP08InvalidPostTransactionResponse extends Exception

Exception thrown when the approval server returns an invalid or malformed response.

This exception is thrown by RegulatedAssetsService::postTransaction() when:

  • The response lacks a required 'status' field
  • The status field contains an unknown/unsupported value
  • Required fields for a given status are missing (e.g., 'tx' for success, 'error' for rejected)
  • HTTP status code is neither 200 (success/revised/pending/action_required) nor 400 (rejected)
  • Response body is not valid JSON

The exception message contains details about what was invalid or missing. The exception code contains the HTTP status code if available.

Handling Recommendations:

  • Log the exception details for debugging approval server issues
  • Display a generic error to the user about approval server unavailability
  • Consider retry logic with exponential backoff for transient server errors
  • Contact the asset issuer if the issue persists
Tags
see
RegulatedAssetsService::postTransaction()

Table of Contents


        
On this page
  • Table Of Contents

Search results