PaymentInvalidResponseException class

Exception thrown when the API response format is invalid or unexpected.

This exception is used when:

  • The response JSON is malformed
  • Required fields are missing in the response
  • The response structure doesn't match the expected format
Inheritance

Constructors

PaymentInvalidResponseException(String message, {dynamic cause, String? responseBody})
Creates a new PaymentInvalidResponseException with the specified details.

Properties

cause → dynamic
The original error that caused this exception, if any. Useful for debugging and error tracking.
finalinherited
errorCode → String?
Error code from the API response, if available. This is the specific error code returned by the server. Example: 'ERR_PAYMENT_ORDER_NOT_FOUND'
finalinherited
errorType → PaymentErrorType
The type of payment error that occurred. This helps categorize the error for appropriate handling.
finalinherited
hashCode → int
The hash code for this object.
no setterinherited
message → String
A human-readable error message describing what went wrong. This should be clear and actionable for developers.
finalinherited
responseBody → String?
Raw response body from the API if available. This contains the complete server response for debugging.
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
statusCode → int?
HTTP status code if the error is related to an API call. This will be null for non-HTTP related errors.
finalinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited