error code and a human-readable
message. Treat the HTTP status and error as the machine-readable contract.
Error format
Error codes
Interpret
server_error together with its HTTP status. A 500 is an unexpected
internal failure, a 502 identifies an upstream operation failure, and a 503
is explicitly temporary and retryable.
Validation errors
400 validation_error messages name the failing field path and the violated
constraint, one path: constraint entry per issue, separated by ;. The
offending value is never echoed back.
Common scenarios
Missing API key
401 unauthorized with Invalid or missing API key.
Agent version conflict
expectedVersion.
Turn already in progress
delivery: "when_idle" so Herm queues it and starts
it automatically once the session is idle — see
Queue a message while a turn is running.
Rate limits
Per-agent user limits return a structured429 response:
resource is conversations or messages. Wait at least the integer number of
seconds in Retry-After before retrying. Handle rate_limited explicitly in
your client.
Successful operations include RateLimit-Limit, RateLimit-Remaining, and
RateLimit-Reset. See
Rate limits for configuration and counting
behavior.

