Errors and Response Codes

The gOnline APIs use HTTP response codes to communicate errors. A list of common errors encountered on the platform is listed below. As a general rule of thumb, a 4XX error is an issue on the client-side, and a 5XX is an error on gOnline. This page contains links to troubleshooting Grubtech APIs for errors and other issues that you may encounter when using APIs.

HTTP Status Codes

The Grubtech API attempts to return appropriate HTTP status codes for every request. In addition to descriptive error text, error messages contain machine-parseable codes. While the text for an error message may change, the codes will stay the same. Error codes in particular help in troubleshooting bad requests.

Most REST APIs follow a standard protocol for response headers. For example, 200 isn't just an arbitrary code decided upon by the OpenWeatherMap API developers. 200 is a universally accepted code for a successful HTTP request. (If you change the method, you will get back a different status code.)

HTTP Response Codes

These are general definitions codes and descriptions for response codes.

Success

HTTP Status Code Definition Meaning
200 Successful response OK The server successfully processed the request and is not returning any content
202 Accepted The request has been accepted for processing, but the processing has not been completed.
204 No Content The server successfully processed the request, and is not returning any content

Failure

HTTP Status Code Definition Meaning
400 Bad request The server cannot or will not process the request due to an apparent client error (e.g., malformed request syntax, size too large, invalid request message framing, or deceptive request routing)
404 Resource not found The requested resource could not be found but may be available in the future. Subsequent requests by the client are permissible
409 Conflict The request could not be completed due to a conflict with the current state of the resource.
500 Internal server error A generic error message, given when an unexpected condition was encountered and no more specific message is suitable