docs

Error Handling (hidden)

Overview

All state endpoints can return a range of HTTP status codes indicating the result of the operation or specific issues encountered. These errors may stem from validation, business rules, session state, or system-level problems. Clients should interpret these codes consistently across endpoints and provide appropriate feedback to users.

Client & Dependency Errors

Status CodeDescription
401Unauthorized – session may have expired, or credentials are missing/invalid.
403Forbidden – action is not permitted for the current user or session.
404Resource not found – e.g., basketId missing from session context.
410The requested resource is no longer available (e.g., confirmed order).
417Customer account was deleted or blocked.
422Validation error – input data does not meet the required schema.
423Resource is locked – e.g., basket or order is currently in use or updating.
424Dependency failure – another service or operation failed.
451Access restricted due to legal reasons. May include an error body for details.

Server Errors

Status CodeDescription
500Internal server error – unexpected condition or system fault.

Frontend Guidance

  • Treat 4xx errors as user-facing issues and display actionable or explanatory messages.
  • Treat 5xx errors as system failures, suggest retry or escalate to support.
  • Handle 401 and 403 by redirecting to login or refreshing the session.
  • For 422, parse the validation details (if present) and highlight specific input issues.
  • 423, 424, and 412 may indicate transient issues – consider retry logic with delay.