Skip to main content

API response status and error codes

When receives a request to an API endpoint, a number of different HTTP status codes can be returned in the response depending on the original request.

HTTP statusDescription
200 OKThe request was successfully processed by Haravan.
400 Bad RequestThe request wasn't understood by the server, generally due to bad syntax or because the Content-Type header wasn't correctly set to application/json.
This status is also returned when the request provides an invalid code parameter during the OAuth token exchange process.
401 UnauthorizedThe necessary authentication credentials are not present in the request or are incorrect.
403 ForbiddenThe server is refusing to respond to the request. This status is generally returned if you haven't requested the appropriate scope for this action.
404 Not FoundThe requested resource was not found but could be available again in the future.
502 Bad GatewayThe server, while acting as a gateway or proxy, received an invalid response from the upstream server. A 502 error isn't typically something you can fix. It usually requires a fix on the web server or the proxies that you're trying to get access through.
500 Internal ServerErrorAn internal error occurred in Haravan