AnyaSelf Docs

Error Reference

Complete catalog of error codes, HTTP statuses, and troubleshooting guidance across all AnyaSelf services.

Every AnyaSelf service returns errors in a consistent envelope. This page documents every error code you can encounter.

Error Envelope

All errors follow this shape:

{
  "error": "ERROR_CODE",
  "message": "Human-readable explanation of what went wrong."
}

Validation errors include field-level details:

{
  "error": "VALIDATION_ERROR",
  "message": "Request validation failed.",
  "details": [
    {
      "loc": ["body", "category"],
      "msg": "value is not a valid enumeration member",
      "type": "value_error"
    }
  ]
}

Global Error Codes

These errors can be returned by any service endpoint.

CodeHTTP StatusDescriptionWhat to Do
NOT_FOUND404The requested resource does not exist.Verify the resource ID is correct and belongs to the specified household.
FORBIDDEN403The authenticated user lacks permission for this action.Ensure the user is a member of the household. Some actions require PARENT/GUARDIAN role.
UNAUTHORIZED401Missing or invalid authentication.Include a valid Bearer JWT in the Authorization header. Token may be expired.
CONFLICT409The request conflicts with current resource state.Check the resource's current state — it may have already been modified.
BAD_REQUEST400The request is malformed or contains invalid data.Review the message field for specifics. Common cause: missing required fields.
VALIDATION_ERROR422Request body failed Pydantic schema validation.Check the details array for field-level errors. Fix the request body and retry.
INTERNAL_ERROR500Unexpected server error.Retry the request. If persistent, check service logs.
HTTP_ERRORvariesGeneric HTTP error from FastAPI.Check the message field for details.

Service-Specific Error Codes

API Gateway

CodeHTTP StatusEndpoint(s)Description
CONFLICT409POST /membersMember already exists in household.
FORBIDDEN403POST /requestsRole cannot create purchase requests (e.g., child member).
FORBIDDEN403POST /requests/{id}/approveAction requires PARENT/GUARDIAN role.
FORBIDDEN403POST /requests/{id}/confirm-checkoutInvalid/expired confirmation token, actor mismatch, or child member.
FORBIDDEN403POST /requests/{id}/cart-ready, POST /requests/{id}/failedMissing or invalid internal buy-flow token (X-Internal-Token).
CONFLICT409POST /requests/{id}/approvePurchase request is already finalized.
CONFLICT409POST /requests/{id}/purchase-intentsRequest must be APPROVED before creating a purchase intent.
CONFLICT409POST /requests/{id}/cart-readyRequest not in a cart-prep eligible state.
CONFLICT409POST /requests/{id}/confirm-checkoutRequest must be CART_READY. Confirmation token already used or missing.

Orchestrator

CodeHTTP StatusEndpoint(s)Description
INVALID_STATE409POST /missions/{mId}/chatMission is already completed (DONE or FAILED).
INVALID_MISSION_TYPE409POST /internal/hyperbeam/eventsHyperbeam/takeover events require an INTERACTIVE mission type.
VALIDATION_ERROR400POST /missions/{mId}/eventsMissing required field for event type (e.g., offerId for USER_LIKED_ITEM, reason for USER_DISLIKED_ITEM, sessionId for takeover events).
FORBIDDEN403POST /missions/{mId}/chatUser does not own this mission.

Wardrobe

CodeHTTP StatusEndpoint(s)Description
NOT_FOUND404All item/outfit endpointsWardrobe item, outfit, image, or feed collection not found.
BAD_REQUEST400POST /itemsownerMemberId is not a household member.
VALIDATION_ERROR400GET /feedUnsupported feed source filter value.
VALIDATION_ERROR400POST /feed/collectionsCollection name is required.
CONFLICT409POST /items/{id}/images/{imgId}/confirmImage already confirmed — cannot confirm twice.
UPSTREAM_ERROR502POST /items/{id}/upload-urlFailed to generate GCS signed upload URL.
UPSTREAM_ERROR502POST /items/{id}/curateLook curation or embedding generation failed upstream.
SERVICE_UNAVAILABLE503POST /items/{id}/curate, POST /outfitsOutfit curation is not enabled in this environment.
BAD_REQUEST400POST /items/{id}/curateUpload an image before running look curation.

Commerce

CodeHTTP StatusEndpoint(s)Description
POLICY_VIOLATION400POST /offers, POST /offers/bulkOffer URL must include a valid domain. Domain not in allowlist (when COMMERCE_ENFORCE_DOMAIN_ALLOWLIST=true).
NOT_FOUND404GET /offers/{id}, PATCH /offers/{id}/status, DELETE /offers/{id}Offer not found.

VTO (Virtual Try-On)

CodeHTTP StatusEndpoint(s)Description
BAD_REQUEST400POST /vto/jobspersonImageRef and garmentImageRef are required. OR memberId is not a household member.
NOT_FOUND404GET /vto/jobs/{jobId}VTO job not found.

Hyperbeam Bridge

CodeHTTP StatusEndpoint(s)Description
UPSTREAM_ERROR502POST /sessions, POST /sessions/{id}/terminate, POST /sessions/{id}/agent-actionHyperbeam Cloud API error — session creation, termination, or action dispatch failed.
INVALID_STATE409POST /sessions/{id}/takeover, POST /sessions/{id}/release, POST /sessions/{id}/agent-actionSession is not in an actionable state (must be ACTIVE or USER_TAKEOVER).
UNSIGNED_EVENT401POST /hyperbeam/eventsEvent signature required but not provided (when HYPERBEAM_ENFORCE_EVENT_SIGNATURES=true).
INVALID_SIGNATURE401POST /hyperbeam/eventsEvent HMAC signature verification failed.
INVALID_REQUEST400POST /sessions/{id}/agent-actionTYPE action requires non-empty text. NAVIGATE action requires non-empty url.

Headless CartPrep

CodeHTTP StatusEndpoint(s)Description
POLICY_VIOLATION400POST /cartprep/jobsOffer URL domain not in allowlist (when CARTPREP_ENFORCE_DOMAIN_ALLOWLIST=true).
NOT_FOUND404GET /cartprep/jobs/{jobId}, POST /cartprep/jobs/{jobId}/processCart prep job not found.

CartPrep Job Failure Codes (returned in the job's errorCode field, not as HTTP errors):

CodeMeaning
BLOCKED_BOT_DETECTEDSite detected bot automation
SIZE_UNAVAILABLERequested size out of stock
POPUP_OVERLAY_UNRESOLVEDCookie/modal overlay blocked interaction
LOGIN_REQUIREDSite requires authentication
UNKNOWN_DOMUnrecognized page structure
TIMEOUTPage or action timed out
DOMAIN_NOT_ALLOWEDURL not in domain allowlist
SAFETY_VIOLATIONAction violates safety policy
INTERNAL_ERRORServer-side error

Artifacts & Audit

CodeHTTP StatusEndpoint(s)Description
NOT_FOUND404GET /artifacts/{id}Artifact not found.
CONFLICT409POST /artifacts/*Artifact with duplicate key already exists.

On this page