Struct stellar_client::StellarError[][src]

pub struct StellarError { /* fields omitted */ }

A resource for the stellar horizon API specific error codes. These errors adhere to the Problem Details Standard and a list of possible erros can be found on the Stellar website

Methods

impl StellarError
[src]

Returns the kind of error that was returned from stellar.

Returns a URL that can provide additional information about the stellar error.

If Horizon cannot understand a request due to invalid parameters, it will return a bad_request error. This is analogous to the HTTP 400 Error.

If you are encountering this error, check the invalid_field attribute on the extras object to see what field is triggering the error.

A horizon server may be configured to only keep a portion of the stellar network’s history stored within its database. This error will be returned when a client requests a piece of information (such as a page of transactions or a single operation) that the server can positively identify as falling outside the range of recorded history.

If you request data from Horizon you are not authorized to see, Horizon will return a forbidden error response. This is analogous to a [HTTP 403 Error][codes].

If you are encountering this error, please check your request and make sure you have permission to receive that data.

When your client only accepts certain formats of data from Horizon and Horizon cannot fulfill that request, Horizon will return a not_acceptable error. This is analogous to the HTTP 406 Error.

If you are encountering this error, please check to make sure the criteria for content you’ll accept is correct.

When Horizon can’t find whatever you are requesting, it will return a not_found error. This is similar to a “404 Not Found” error response in HTTP.

Incorrect URL path parameters or missing data are the common reasons for this error. If you navigate using a link from a valid response, you should never receive this error message.

If your request method is not supported by Horizon, Horizon will return a not_implemented error. This is analogous to a HTTP 501 Error.

If you are encountering this error, Horizon does not have the functionality you are requesting yet.

When a single user makes too many requests to Horizon in a one hour time frame, Horizon returns a rate_limit_exceeded error. By default, Horizon allows 3600 requests per hour – an average of one request per second. See the Rate Limiting Guide for more info.

If there’s an internal error within Horizon, Horizon will return a server_error response. This response is a catch-all, and can refer to many possible errors in the Horizon server: a configuration mistake, a database connection error, etc.

Horizon does not expose information such as stack traces or raw error messages to a client. Doing so may reveal sensitive configuration data such as secret keys.

A horizon server may be configured to reject historical requests when the history is known to be further out of date than the configured threshold. In such cases, this error is returned. To resolve this error (provided you are the horizon instance’s operator) please ensure that the ingestion system is running correctly and importing new ledgers.

This error occurs when a client submits a transaction that was well-formed but was not included into the ledger due to some other failure. For example, a transaction may fail if:

The source account for transaction cannot pay the minimum fee. The sequence number is incorrect. One of the contained operations has failed such as a payment operation that overdraws the paying account. In almost every case, this error indicates that the transaction submitted in the initial request will never succeed. There is one exception: a transaction that fails with the tx_bad_seq result code (as expressed in the result_code field of the error) may become valid in the future if the sequence number it used was too high.

When you submit a malformed transaction to Horizon, Horizon will return a transaction_malformed error. There are many ways in which a transaction is malformed, including

you submitted an empty string your base64-encoded string is invalid your XDR structure is invalid you have leftover bytes in your XDR structure

The Stellar API returns an error type that is currently unknown to the sdk

Trait Implementations

impl Debug for StellarError
[src]

Formats the value using the given formatter. Read more

impl<'de> Deserialize<'de> for StellarError
[src]

Deserialize this value from the given Serde deserializer. Read more

impl Error for StellarError
[src]

This method is soft-deprecated. Read more

The lower-level cause of this error, if any. Read more

impl Display for StellarError
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations