Skip to main content
Every error response from the InfraAudit API follows a consistent JSON structure so you can handle errors programmatically regardless of the endpoint.

Error response format

error
string
required
A human-readable message describing what went wrong. Suitable for logging but not for display to end users.
code
string
A machine-readable error code. Use this field for programmatic error handling. May be absent on some error types.
details
string
Additional context about the error, such as which field failed validation or which resource was not found. Optional.

HTTP status codes

Handling errors

Common error codes

The code field is not present on all error responses. Always fall back to the HTTP status code for error handling.