SubmitTransactionUnknownResponseException class
Exception thrown when Horizon returns an unexpected response status.
This exception is raised when the HTTP status code from Horizon does not match any of the expected response codes (200 for success, 504 for timeout, or standard error codes). This typically indicates an API version mismatch, server error, or network issue.
Deprecated: Use UnknownResponse instead. This class is maintained for backward compatibility but will be removed in a future version.
Example:
try {
final response = await sdk.submitTransaction(transaction);
} on SubmitTransactionUnknownResponseException catch (e) {
print('Unexpected status code: ${e.code}');
print('Response body: ${e.body}');
}
See also:
- UnknownResponse for the replacement class
- SubmitTransactionTimeoutResponseException for timeout errors
- Inheritance
-
- Object
- UnknownResponse
- SubmitTransactionUnknownResponseException
- Annotations
-
- @Deprecated('Use [UnknownResponse]')
Constructors
- SubmitTransactionUnknownResponseException(int code, String body)
Properties
- body ↔ String
-
Raw response body that could not be parsed.
getter/setter pairinherited
- code ↔ int
-
HTTP status code of the response.
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
Returns a string representation of this instance for debugging.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited