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]
impl StellarError
pub fn kind(&self) -> Kind
[src]
pub fn kind(&self) -> Kind
Returns the kind of error that was returned from stellar.
pub fn url(&self) -> &str
[src]
pub fn url(&self) -> &str
Returns a URL that can provide additional information about the stellar error.
pub fn is_bad_request(&self) -> bool
[src]
pub fn is_bad_request(&self) -> bool
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.
pub fn is_before_history(&self) -> bool
[src]
pub fn is_before_history(&self) -> bool
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.
pub fn is_forbidden(&self) -> bool
[src]
pub fn is_forbidden(&self) -> bool
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.
pub fn is_not_acceptable(&self) -> bool
[src]
pub fn is_not_acceptable(&self) -> bool
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.
pub fn is_not_found(&self) -> bool
[src]
pub fn is_not_found(&self) -> bool
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.
pub fn is_not_implemented(&self) -> bool
[src]
pub fn is_not_implemented(&self) -> bool
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.
pub fn is_rate_limit_exceeded(&self) -> bool
[src]
pub fn is_rate_limit_exceeded(&self) -> bool
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.
pub fn is_internal_server_error(&self) -> bool
[src]
pub fn is_internal_server_error(&self) -> bool
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.
pub fn is_stale_history(&self) -> bool
[src]
pub fn is_stale_history(&self) -> bool
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.
pub fn is_transaction_failed(&self) -> bool
[src]
pub fn is_transaction_failed(&self) -> bool
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.
pub fn is_transaction_malformed(&self) -> bool
[src]
pub fn is_transaction_malformed(&self) -> bool
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
pub fn is_unknown_error(&self) -> bool
[src]
pub fn is_unknown_error(&self) -> bool
The Stellar API returns an error type that is currently unknown to the sdk
Trait Implementations
impl Debug for StellarError
[src]
impl Debug for StellarError
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<'de> Deserialize<'de> for StellarError
[src]
impl<'de> Deserialize<'de> for StellarError
fn deserialize<D>(d: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
fn deserialize<D>(d: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Error for StellarError
[src]
impl Error for StellarError
fn description(&self) -> &str
[src]
fn description(&self) -> &str
This method is soft-deprecated. Read more
fn cause(&self) -> Option<&Error>
1.0.0[src]
fn cause(&self) -> Option<&Error>
The lower-level cause of this error, if any. Read more
impl Display for StellarError
[src]
impl Display for StellarError
Auto Trait Implementations
impl Send for StellarError
impl Send for StellarError
impl Sync for StellarError
impl Sync for StellarError