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:

Key
Value

message

Human readable message which corresponds to the client error.

code

Underscored 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 Code
Description

200

OK. Everything worked as expected.

201

Created. We will return a 201 after a successful POST where a resource was created.

302

Retry request on given redirect URI.

400

Malformed request.

401

Unauthorised. The request requires user authentication (not logged in).

403

Forbidden. 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.

404

Resource not found.

406

Unacceptable 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.

409

A conflict needs to be resolved before the request can be made.

422

Invalid request.
The request body is parse-able however with invalid content or there are issues with a rider’s user account.

429

Too Many Requests.
Client has exceeded the rate limit for requests.

500

Internal 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.

503

The requested service is not available.

Updated 3 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.