The Treasure API returns detailed error responses in various scenarios to provide control to integrating clients on how they handle cases in which an action cannot be completed as requested. This can range in reason from an invalid request structure (i.e. a field that is the wrong type), to an operation that can’t be completed due to rules and constraints on when an action can be taken (e.g. trying to request wire instructions when the account is not open), to temporary system unavailability (e.g. cloud service disruptions).
The structure for these errors is defined below, as well as a table with Error Codes, related HTTP status codes, message, and a description of what the error means.