SpectroCoin communicates the result of an API request using standard HTTP response codes. As a general rule, 2xx
codes indicate success. 4xx
codes point to errors resulting from the provided information, such as missing a required parameter or a charge failure. 5xx
codes, though rare, indicate issues with our servers.
Certain programmatically resolvable 4xx
errors (like a card being declined) include an error code briefly explaining the error.
Status code | Description |
---|---|
200 - OK | Everything worked as expected. |
400 - Bad Request | The request could not be processed due to the absence of a required parameter in the JSON string, such as an account identifier. |
401 - Unauthorized | No valid API key was provided. |
403 - Forbidden | The request has been denied as access to the specified endpoint is restricted, possibly due to the disallowed IP address from which the request was initiated. |
404 - Not Found | The requested resource doesn't exist. |
422 - Unprocessable Entity | The request was not able to be processed due to incorrect syntax in the JSON string, such as a missing comma. |
429 - Too Many Requests | API request limit is exceeded. Too many requests hit the API too quickly. |
500, 502, 503, 504 - Server Errors | Something wrong with SpectroCoin. (These are rare.) |
Errors
Error response example:
{
"defaultMessage": "string",
"errorCode": "GEN_1 - Internal server error occurred",
"spanId": "string",
"traceId": "string"
}
Field Name | Description |
---|---|
defaultMessage | A human-readable message providing more details about the error. |
errorCode | In the event of a programmable error, our system will assertively report a brief error code, enabling you to promptly resolve the issue at hand. |
spanId | A unique identifier for the specific operation within a request. This ID helps trace the error within a single request flow, particularly in microservices. |
traceId | A unique identifier for tracking a request across multiple services in a distributed system. |