Problem types
Echo Pro problems have an exact type URI and snake_case code. Match both fields when handling errors.
Titles and detail are display text. They can change or be translated.
Your application can define problem types with absolute type URIs.
A built-in code with your own type names your application’s problem type.
HTTP responses
Section titled “HTTP responses”Default responses use Content-Type: application/problem+json. HEAD responses have no body.
Each package defines its own extension fields and retry headers.
A status alone does not tell you whether a mutation applied.
Pass your previous Echo error handler to problem/echoadapter.ErrorHandlerConfig.ToErrorHandler(fallback).
The adapter renders errors implementing Problem() problem.Details and passes other errors to that fallback.
The adapter preserves existing WWW-Authenticate, Allow and Retry-After headers. It adds no Retry-After header of its own.
Quota denials include violated-policies.
Execution problems include operation_ref, operation_state and safe_new_key.
Console problems always include detail, which may be empty.
Execution replay returns stored problem responses unchanged. It does not translate or reclassify them.
Replay sends only headers listed in ReplayHeaders and adds Idempotent-Replayed: true.
Your application can replace these bodies with custom handlers. Update clients if you change the response fields.
Catalog
Section titled “Catalog”Quota type URIs
Section titled “Quota type URIs”Quota uses https://iana.org/assignments/http-problem-types#quota-exceeded when a request exceeds a bucket, day, month, billing-period or concurrency limit.
It returns 429 with code quota_exceeded. Respect Retry-After and inspect violated-policies.
When a strict limit cannot reach its store, quota uses https://iana.org/assignments/http-problem-types#temporary-reduced-capacity.
The response has status 503 and code temporary_reduced_capacity.
The middleware sends Retry-After when it has a delay; quota administration routes send none.
An unavailable store does not mean the customer exhausted their budget.
Echo Pro does not claim that IANA has registered these URIs.
Related pages
Section titled “Related pages”Authentication explains 401 and missing scopes.
Quota explains exhausted budgets and unavailable stores.
Execution explains uncertain sends and when safe_new_key allows a new operation key.
Admin explains preview, commit and audit failures.
Execution tasks show how to return typed problems and replay saved responses.