Exceptions
Understand the different exceptions the Economy SDK throws when errors occur.
Read time 1 minuteLast updated 7 months ago
Economy exception
An is thrown when there is a problem with one of the operations in the SDK. These exceptions should be handled by calling code. The methods that can throw these exceptions are clearly marked in the method documentation.
EconomyExceptionThe has the following field in addition to those normally provided by C# :
EconomyExceptionException- : An
Reasonis an enum value that describes what category of issue occurred. This is provided to allow a code-friendly way of detecting and handling the different types of errors that can be thrown.EconomyExceptionReason
Inspect the field on an for a human-readable description of the error that was thrown.
MessageEconomyExceptionThere are method-specific exceptions that may also be thrown by the Economy SDK. These are specified in the method documentation.
Economy validation exception
EconomyValidationExceptionEconomyExceptionEconomyValidationExceptionIt contains one extra field:
- : This is a list of errors returned from the API's Validation Error Response. It is a list of economy validation error details.
Details
Economy validation error detail
An represents a single error returned from the API's Validation Error Response.
EconomyValidationErrorDetailIt contains two fields:
- : The field in the data that caused the error. This is a string.
Field - : Messages that describe the errors. This is a list of strings.
Messages
Economy rate limited exception
EconomyRateLimitedExceptionEconomyExceptionIt contains one extra field:
- : The number of seconds until the client is no longer rate limited. This is an int.
RetryAfter