856

Mothership uses conventional HTTP response codes.

  • 2xx codes represent a successful request.
  • 4xx codes represent a failed request with a descriptive error message.
  • 5xx codes represent a failed request due to a Mothership server error.

All error responses follow the same format.

{
  "code": number, // Status code of the error
  "type": string, // General categorization of the error
  "message": string // Description of the error
}

Below are common errors that you may encounter across all Mothership endpoints. You may encounter endpoint-specific errors as well; these are detailed in the documentation for the endpoint in question.

ErrorStatus CodeDescription
Invalid Request400Unable to process request due to business logic error (e.g. No Rate Found, or Cargo Too Large). More details can be found in the response'smessage property.
Validation Error400Request data has one or more invalid fields. See the endpoint's documentation for additional information.
Unauthenticated 401Missing or invalid authentication token.
Forbidden 403Authenticated, but missing permission to use this resource.
Rate Limit Exceeded429Too many requests in too short of a timespan. See the rate limiting documentation for more details.
Server Error500An unexpected server error occurred. If you encounter this and the problem is not resolved within 24 hours, please contact us at [email protected].