Skip to content

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.

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.

Problem codeHTTP status
admin_action_id_reused409
admin_audit_unavailable503
admin_backend_unavailable503
admin_busy503
admin_confirmation_required422
admin_cross_origin403
admin_csrf_invalid403
admin_forbidden403
admin_in_progress409
admin_internal500
admin_invalid_request400
admin_method_not_allowed405
admin_not_found404
admin_not_ready503
admin_rate_limited429
admin_reason_required422
admin_selection_required400
admin_timeout504
admin_unauthenticated401
binding_failed400
body_too_large413
cost_exceeds_limit403
credit_conflict409
execution_capacity503
execution_unavailable503
forbidden403
idempotency_key_invalid400
idempotency_key_missing400
idempotency_key_reused422
idempotency_request_invalid400, 413
insufficient_credits402
invalid_request400
operation_abandoned409
operation_disputed409
operation_in_progress409
operation_not_applied409
operation_policy_changed409
operation_response_too_large500
operation_result_expired409
operation_result_unavailable409
operation_uncertain409
quota_exceeded429
temporary_reduced_capacity503
unauthenticated401
unsupported_media_type415
validation_failed400

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.

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.