Status codes and error codes
When Genstore processes a REST API request, it returns specific HTTP status codes based on the outcome of the request. This section details the status codes you may encounter, along with their meanings.
Successful responses
When an app's REST API request receives a successful response, the HTTP status code will be within the 2xx range, indicating that the request has been successfully received, understood, and processed.
Example:
HTTP status: HTTP/1.1 200 OK
HTTP body:
{ "customer": {"id":123456, "name": "book"} }
Error responses
When an app's REST API request receives an error response, the HTTP status code is outside the 2xx range, and an error message is returned. Example below:
HTTP status: HTTP/1.1 400 Bad Request
HTTP body:
{"error": "Amount must be less than net payment", "order": {...}}
Exceptional responses always include an error
field that describes the error information for the current request.
Refer to the response status code table below for specific meanings.
Rest API response status codes
Status Code | Description | Type | Details |
---|---|---|---|
200 | OK | Standard | Request succeeded. |
201 | Created | Standard | Successfully created a new resource. |
202 | Accepted | Standard | Request accepted, processing pending. |
204 | No Content | Standard | Request succeeded, no content returned. |
205 | Reset Content | Standard | Request succeeded, requester should reset view. |
303 | See Other | Standard | Request redirected to another URI. |
400 | Bad Request | Standard | Malformed request syntax; cannot process. |
401 | Unauthorized | Standard | Missing or invalid authentication credentials. |
402 | Payment Required | Standard | Payment necessary to access resources. |
403 | Forbidden | Standard | Server understood but refuses to authorize. |
404 | Not Found | Standard | Requested resource could not be found. |
405 | Method Not Allowed | Standard | Method not allowed for the requested resource. |
406 | Not Acceptable | Standard | Cannot produce response acceptable to the client. |
409 | Resource Conflict | Standard | Request conflicts with resource's current state. |
414 | URI Too Long | Standard | URI too long to process. |
415 | Unsupported Media Type | Standard | Media type of request not supported. |
422 | Unprocessable Entity | Standard | Semantic errors in request. |
423 | Locked | Standard | Resource being accessed is locked. |
429 | Too Many Requests | Standard | User has sent too many requests (rate limiting). |
500 | Internal Server Error | Standard | Server encountered an unexpected condition. |
501 | Not Implemented | Standard | Server does not support the requested function. |
502 | Bad Gateway | Standard | Invalid response received from upstream server. |
503 | Service Unavailable | Standard | Server temporarily unavailable (overload/maintenance). |
504 | Gateway Timeout | Standard | No timely response from upstream server. |
530 | Origin DNS Error | Non-standard | DNS resolution error. |
540 | Temporarily Disabled | Non-standard | Service temporarily disabled on the server. |
783 | Unexpected Token | Non-standard | Error processing a token in the request. |
- Standard: Comply with HTTP protocol standards.
- Non-standard: Unique to Genstore, addressing specific platform situations.