Errors

The Humance API returns standard HTTP status codes to indicate the success or failure of a request. All successful requests return code 200, in case of any errors or other, a code other than 200 will be returned. Below is a summary of possible error codes along with their descriptions:

HTTP STATUS CODE SUMMARY

Code
Status
Description

200

OK

Everything worked as expected. Do not return the error object

400

Bad Request

The request was unacceptable, often due to missing a required parameter.

401

Unauthorized

No valid API key provided.

402

Request Failed

The parameters were valid but the request failed.

403

Forbidden

The API key doesn't have permission to perform the request.

404

Not Found

The requested resource doesn't exist.

409

Conflict

The request conflicts with another request (perhaps due to using the same idempotent key).

422

Validation error

Errors of transferred parameters

429

Too Many Requests

Too many requests hit the API too quickly. We recommend an exponential backoff of your requests.

RESPONSE: Error response object

{
    // Description of error
	"message": "This action is unauthorized.",

    // Error code
	"code": 40300,

    // A hint of a possible solution to the problem
	"fix": "You don't have access to the resource",

    // Errors of transferred parameters
    "params": {
		"parameter_1": [
			"Error message 1",
			"Error message 2"
		],
        "parameter_2": [
			"Error message 1",
			"Error message 2"
		],
        ...
	}
}

Last updated