Skip to content

API errors

Open AIQ errors use RFC 9457 Problem Details and the application/problem+json media type. Clients should branch on type, status, and structured extensions rather than parsing the human-readable detail string.

{
"type": "https://docs.air-iq.net/reference/errors/#validation-error",
"title": "Request validation failed",
"status": 422,
"detail": "One or more request values are invalid.",
"instance": "/api/v1/devices",
"errors": [
{
"in": "body",
"name": "name",
"code": "required",
"detail": "name is required"
}
]
}
Field Meaning
type Stable identifier and link to the problem category below.
title Short title shared by every occurrence of that type.
status HTTP status, repeated in the body for persisted responses and tooling.
detail Safe, occurrence-specific guidance intended for a person.
instance Request path for this occurrence; query strings and credentials are excluded.
errors Optional list identifying invalid inputs.

Each item in errors has an in location (body, query, or path), an input name, a stable code, and a human-readable detail. A response can contain more than one violation.

Malformed JSON returns 400; oversized content returns 413; unsupported request media types return 415; and well-formed input that violates the endpoint contract returns 422.

The following catalog is generated from the same Go registry used to produce runtime responses.

Malformed request

Type
https://docs.air-iq.net/reference/errors/#malformed-request
Default status
400

The request could not be decoded.

Unauthorized

Type
https://docs.air-iq.net/reference/errors/#unauthorized
Default status
401

Valid credentials are required.

Resource not found

Type
https://docs.air-iq.net/reference/errors/#not-found
Default status
404

The requested resource was not found.

Method not allowed

Type
https://docs.air-iq.net/reference/errors/#method-not-allowed
Default status
405

The request method is not supported for this resource.

No readings available

Type
https://docs.air-iq.net/reference/errors/#no-readings
Default status
404

The device has not reported any readings.

Request content too large

Type
https://docs.air-iq.net/reference/errors/#content-too-large
Default status
413

The request body exceeds the accepted size.

Unsupported media type

Type
https://docs.air-iq.net/reference/errors/#unsupported-media-type
Default status
415

The request uses an unsupported media type.

Request validation failed

Type
https://docs.air-iq.net/reference/errors/#validation-error
Default status
422

One or more request values are invalid.

Internal server error

Type
https://docs.air-iq.net/reference/errors/#internal-error
Default status
500

The server could not complete the request.