Errors

Hubli APIs use conventional HTTP response codes to indicate the success or failure of a request. In general:

  • Codes in the 2xx range indicate success.
  • Codes in the 4xx range indicate an error caused by the information provided in the request.
  • Codes in the 5xx range indicate a problem with Hubli's servers.

Error responses include a structured JSON body. Inspect the status and title fields first, then read detail or errors for more information.


The Error object

Example error response
{
  "status": 400,
  "title": "One or more validation errors occurred.",
  "detail": "The request body failed validation.",
  "errors": [
    {
      "propertyName": "clientId",
      "errorMessage": "'Client Id' must not be empty."
    }
  ]
}

Attributes

statusinteger

The HTTP status code for the error.

titlestring

A short, human-readable summary of the error.

detailstring

A more detailed explanation of the error, when available.

errorsarray

A list of validation failures, present for 400 Bad Request responses.

Error shapes may vary

Some legacy endpoints return plain text error messages rather than structured JSON. Always inspect the response content when handling errors.

HTTP status code summary
200OKThe request completed successfully.
201CreatedThe resource was created successfully.
400Bad RequestThe request body failed validation or was malformed.
401UnauthorizedThe Authorization header is missing, expired, or invalid.
403ForbiddenThe token is valid but the caller does not have permission.
404Not FoundThe requested resource or endpoint does not exist.
409ConflictThe request would create a duplicate or violate a business rule.
422Unprocessable EntityThe request was understood but contains a semantic error.