Errors
Hubli APIs use conventional HTTP response codes to indicate the success or failure of a request. In general:
- Codes in the
2xxrange indicate success. - Codes in the
4xxrange indicate an error caused by the information provided in the request. - Codes in the
5xxrange 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
statusintegerThe HTTP status code for the error.
titlestringA short, human-readable summary of the error.
detailstringA more detailed explanation of the error, when available.
errorsarrayA 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
| 200 | OK | The request completed successfully. |
| 201 | Created | The resource was created successfully. |
| 400 | Bad Request | The request body failed validation or was malformed. |
| 401 | Unauthorized | The Authorization header is missing, expired, or invalid. |
| 403 | Forbidden | The token is valid but the caller does not have permission. |
| 404 | Not Found | The requested resource or endpoint does not exist. |
| 409 | Conflict | The request would create a duplicate or violate a business rule. |
| 422 | Unprocessable Entity | The request was understood but contains a semantic error. |