--- url: https://docs.youcan.shop/store-admin/introduction/errors.md --- # Errors Every error includes a code, the HTTP status code, a short detail, and an additional meta can be used to help the YouCan support team investigate in your error quickly. ## Errors Types | HTTP status | Description | | ----------- | ---------------------------------------------- | | 401 | The request is not authorized — the app is not approved, the feature is inactive, or the store cannot be billed | | 402 | The store is closed for unpaid invoices. See [Store states](#store-states) | | 403 | The store is closed, on hold or deleted. See [Store states](#store-states) | | 404 | The resource requested not found or deleted | | 405 | *Method not allowed* this error happened when the endpoint requested doesn't support the current request types | | 422 | *Unprocessable entity* this error happened when the request doesn't respect the validation ex: missing required field, invalid fields type| | 500 | *500 Internal Server Error* this error is generic happened when something got wrong in the service side while processing the request | ## Store states Requests for a store that is not open are refused. You get the HTTP status and a `code` for the store state. | HTTP status | `code` | Store state | | ----------- | -------------------------- | ----------- | | 402 | `store_closed_for_payment` | Closed for unpaid invoices. The merchant must pay the due invoices in the billing settings. | | 403 | `store_closed` | Closed. | | 403 | `store_on_hold` | On hold. The merchant must contact YouCan support. | | 403 | `store_closed_by_admin` | Closed by YouCan. The merchant must contact YouCan support. | | 403 | `store_deleted` | Deleted. | You can still call `/me`, `/stores` and the billing endpoints for a refused store. In MCP, the same error is returned as the tool result. ### Examples #### Closed store ```json { "status": 403, "code": "store_on_hold", "detail": "The store is on hold. The merchant must contact YouCan support." } ``` #### Not found ```json { "status": 404, "detail": "Customer not found", "meta": [] } ``` ### Validation error ```json { "status": 422, "detail": "The given data was invalid.", "meta": { "fields": { "email": [ "The email field is required." ], "password": [ "The password field is required." ], "password_confirmation": [ "The password confirmation field is required." ] } } } ``` ### Unsupported request type error ```json { "status": 404, "detail": "The POST method is not supported for this route. Supported methods: GET, HEAD, PUT, DELETE.", "meta": [] } ``` ### Internal error ```json { "status": 500, "detail": "internal error" } ```