Karhoo for Developers | Mobility Exchange API and SDK reference

Interpreting errors

Error responses sent from the servers will be accompanied by a JSON body, with the following keys:

KeyValue
messageHuman readable message which corresponds to the client error.
codeUnderscored delimited string.

Example Error Response

{ 
  "message": "Invalid user",
  "code": "invalid" 
}

HTTP Status Codes

Status codes are issued in responses to requests made to the server.

HTTP Status CodeDescription
200OK. Everything worked as expected.
201Created. We will return a 201 after a successful POST where a resource was created.
302Retry request on given redirect URI.
400Malformed request.
401Unauthorised. The request requires user authentication (not logged in).
403Forbidden. Used for unauthorised requests where your permissions restrict the request.

Can also indicate that the User is not allowed. User is banned and is not permitted to request a ride.
404Resource not found.
406Unacceptable content type.
Client sent an Accepts header for a content type which does not exist on the server. Body includes a list of acceptable content types, such as “Unacceptable content type. Request resource as: application/json.
409A conflict needs to be resolved before the request can be made.
422Invalid request.
The request body is parse-able however with invalid content or there are issues with a rider’s user account.
429Too Many Requests.
Client has exceeded the rate limit for requests.
500Internal Server Error.
Something has gone wrong on the website’s server, but the server could not be more specific on what the exact problem is.
503The requested service is not available.

Updated 7 months ago

Interpreting errors


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.