Errors

The Umbra ERP API uses conventional HTTP response codes and returns structured JSON error responses to help you identify and resolve issues.


Error response format

All error responses follow a consistent JSON structure with a result field set to "error" or "failed", along with an error object or message describing what went wrong.

Error object properties

  • Name
    result
    Type
    string
    Description

    Always "error" or "failed" for error responses.

  • Name
    error.type
    Type
    string
    Description

    A machine-readable error type identifier (e.g., Unauthorized, InvalidRequestParameters).

  • Name
    error.message
    Type
    string
    Description

    A human-readable description of the error.

  • Name
    message
    Type
    string
    Description

    Alternative location for the error message (some endpoints use this instead of nested error object).

Error response (structured)

{
  "result": "error",
  "error": {
    "type": "InvalidRequestParameters",
    "message": "customer_id is required."
  }
}

Error response (simple)

{
  "result": "failed",
  "message": "Email should be more than 3 characters and less than 30 characters"
}

Error types

The following error types may be returned by the API:

Error TypeDescription
UnauthorizedInvalid or missing JWT token
InvalidRequestParametersMissing or invalid request body fields
ResourceConflictA resource with the same identifier already exists
ResourceNotFoundThe requested resource does not exist
RateLimitExceededToo many requests -- slow down and retry
InternalServerErrorAn unexpected error occurred on the server

HTTP status codes

The Umbra ERP API uses standard HTTP status codes:

StatusDescription
200OK -- The request was successful
400Bad Request -- Invalid or missing parameters
401Unauthorized -- Invalid or missing JWT token
404Not Found -- The requested resource does not exist
429Too Many Requests -- Rate limit exceeded
500Internal Server Error -- Something went wrong on our end

Rate limiting

Most endpoints are rate-limited. When you exceed the limit, the API returns a 429 status code. Implement exponential backoff in your retry logic.

401 Unauthorized

{
  "result": "error",
  "error": {
    "type": "Unauthorized",
    "message": "Unauthorized. The provided token is invalid or expired."
  }
}

400 Bad Request

{
  "result": "error",
  "error": {
    "type": "InvalidRequestParameters",
    "message": "Currency is required. Parameter: currency"
  }
}

Was this page helpful?