# Errors

> Every error is an RFC 9457 problem details body with a stable code and a link to its page.

## Shape

Errors answer with a 4xx or 5xx status and `Content-Type: application/problem+json`:

```json
{
  "type": "https://api.bymundi.com/problems/invalid_request",
  "title": "Bad Request",
  "status": 400,
  "detail": "The passenger would not be valid.",
  "code": "invalid_request",
  "requestId": "req_7f3c…",
  "errors": [{ "path": "email", "message": "Invalid email" }]
}
```

- **`code`** is stable: branch on it, never on `detail` or `title`.
- **`type`** opens a page that explains the code and what to do.
- **`errors[]`**, when present, names each failing field by its path in your request (`ops.2.parentId`).
- **`requestId`** is also in the `Request-Id` header of every response, success or not. Quote it when you report a problem.

Some problems add members: `requiresConfirmation` on [`confirmation_required`](https://api.bymundi.com/problems/confirmation_required.md), `occupiedDays` on [`days_occupied`](https://api.bymundi.com/problems/days_occupied.md).

## What to retry

| Status | Retry? |
|---|---|
| 400, 401, 403, 404, 422 | No: fix the request. |
| 409 | After re-reading: the resource changed, or a request is still running. |
| 429 | Yes, after `Retry-After` seconds. |
| 500, 503 | Yes, with backoff and the same `Idempotency-Key` for writes. |

## Every code

- [`access_not_open`](https://api.bymundi.com/problems/access_not_open.md)
- [`already_complete`](https://api.bymundi.com/problems/already_complete.md)
- [`already_deleted`](https://api.bymundi.com/problems/already_deleted.md)
- [`already_queued`](https://api.bymundi.com/problems/already_queued.md)
- [`ambiguous_ref`](https://api.bymundi.com/problems/ambiguous_ref.md)
- [`bad_pairing`](https://api.bymundi.com/problems/bad_pairing.md)
- [`basket_rules`](https://api.bymundi.com/problems/basket_rules.md)
- [`being_edited`](https://api.bymundi.com/problems/being_edited.md)
- [`body_too_large`](https://api.bymundi.com/problems/body_too_large.md)
- [`change_not_applied`](https://api.bymundi.com/problems/change_not_applied.md)
- [`confirmation_required`](https://api.bymundi.com/problems/confirmation_required.md)
- [`conflict`](https://api.bymundi.com/problems/conflict.md)
- [`contact_exists`](https://api.bymundi.com/problems/contact_exists.md)
- [`day_plan_refused`](https://api.bymundi.com/problems/day_plan_refused.md)
- [`days_occupied`](https://api.bymundi.com/problems/days_occupied.md)
- [`decision_refused`](https://api.bymundi.com/problems/decision_refused.md)
- [`delivery_busy`](https://api.bymundi.com/problems/delivery_busy.md)
- [`dry_run_unsupported`](https://api.bymundi.com/problems/dry_run_unsupported.md)
- [`duplicate_client_id`](https://api.bymundi.com/problems/duplicate_client_id.md)
- [`empty_route`](https://api.bymundi.com/problems/empty_route.md)
- [`empty_selection`](https://api.bymundi.com/problems/empty_selection.md)
- [`empty_update`](https://api.bymundi.com/problems/empty_update.md)
- [`endpoint_disabled`](https://api.bymundi.com/problems/endpoint_disabled.md)
- [`endpoint_exists`](https://api.bymundi.com/problems/endpoint_exists.md)
- [`endpoint_limit`](https://api.bymundi.com/problems/endpoint_limit.md)
- [`entry_deleted`](https://api.bymundi.com/problems/entry_deleted.md)
- [`event_type_not_permitted`](https://api.bymundi.com/problems/event_type_not_permitted.md)
- [`external_id_taken`](https://api.bymundi.com/problems/external_id_taken.md)
- [`field_not_applicable`](https://api.bymundi.com/problems/field_not_applicable.md)
- [`file_too_large`](https://api.bymundi.com/problems/file_too_large.md)
- [`filter_too_broad`](https://api.bymundi.com/problems/filter_too_broad.md)
- [`folder_not_in_trip`](https://api.bymundi.com/problems/folder_not_in_trip.md)
- [`forbidden`](https://api.bymundi.com/problems/forbidden.md)
- [`https_required`](https://api.bymundi.com/problems/https_required.md)
- [`idempotency_key_reused`](https://api.bymundi.com/problems/idempotency_key_reused.md)
- [`inline_too_large`](https://api.bymundi.com/problems/inline_too_large.md)
- [`insufficient_scope`](https://api.bymundi.com/problems/insufficient_scope.md)
- [`internal`](https://api.bymundi.com/problems/internal.md)
- [`invalid_base64`](https://api.bymundi.com/problems/invalid_base64.md)
- [`invalid_block`](https://api.bymundi.com/problems/invalid_block.md)
- [`invalid_content`](https://api.bymundi.com/problems/invalid_content.md)
- [`invalid_cursor`](https://api.bymundi.com/problems/invalid_cursor.md)
- [`invalid_idempotency_key`](https://api.bymundi.com/problems/invalid_idempotency_key.md)
- [`invalid_json`](https://api.bymundi.com/problems/invalid_json.md)
- [`invalid_line`](https://api.bymundi.com/problems/invalid_line.md)
- [`invalid_lines`](https://api.bymundi.com/problems/invalid_lines.md)
- [`invalid_parent`](https://api.bymundi.com/problems/invalid_parent.md)
- [`invalid_request`](https://api.bymundi.com/problems/invalid_request.md)
- [`invalid_rich_text`](https://api.bymundi.com/problems/invalid_rich_text.md)
- [`invalid_route`](https://api.bymundi.com/problems/invalid_route.md)
- [`invalid_stop`](https://api.bymundi.com/problems/invalid_stop.md)
- [`invalid_url`](https://api.bymundi.com/problems/invalid_url.md)
- [`key_invalid`](https://api.bymundi.com/problems/key_invalid.md)
- [`kind_mismatch`](https://api.bymundi.com/problems/kind_mismatch.md)
- [`mejora_needs_package`](https://api.bymundi.com/problems/mejora_needs_package.md)
- [`metadata_too_large`](https://api.bymundi.com/problems/metadata_too_large.md)
- [`method_not_allowed`](https://api.bymundi.com/problems/method_not_allowed.md)
- [`mode_immutable`](https://api.bymundi.com/problems/mode_immutable.md)
- [`negative_price`](https://api.bymundi.com/problems/negative_price.md)
- [`no_contact`](https://api.bymundi.com/problems/no_contact.md)
- [`no_design`](https://api.bymundi.com/problems/no_design.md)
- [`no_email`](https://api.bymundi.com/problems/no_email.md)
- [`no_inverse`](https://api.bymundi.com/problems/no_inverse.md)
- [`not_a_base_line`](https://api.bymundi.com/problems/not_a_base_line.md)
- [`not_an_image`](https://api.bymundi.com/problems/not_an_image.md)
- [`not_archived`](https://api.bymundi.com/problems/not_archived.md)
- [`not_deleted`](https://api.bymundi.com/problems/not_deleted.md)
- [`not_found`](https://api.bymundi.com/problems/not_found.md)
- [`nothing_to_update`](https://api.bymundi.com/problems/nothing_to_update.md)
- [`origin_not_allowed`](https://api.bymundi.com/problems/origin_not_allowed.md)
- [`output_contract`](https://api.bymundi.com/problems/output_contract.md)
- [`owner_not_staff`](https://api.bymundi.com/problems/owner_not_staff.md)
- [`package_in_use`](https://api.bymundi.com/problems/package_in_use.md)
- [`package_slot_taken`](https://api.bymundi.com/problems/package_slot_taken.md)
- [`parent_not_found`](https://api.bymundi.com/problems/parent_not_found.md)
- [`pax_below_roster`](https://api.bymundi.com/problems/pax_below_roster.md)
- [`pax_exceeded`](https://api.bymundi.com/problems/pax_exceeded.md)
- [`pax_locked`](https://api.bymundi.com/problems/pax_locked.md)
- [`pax_out_of_range`](https://api.bymundi.com/problems/pax_out_of_range.md)
- [`place_required`](https://api.bymundi.com/problems/place_required.md)
- [`place_taken`](https://api.bymundi.com/problems/place_taken.md)
- [`plan_refused`](https://api.bymundi.com/problems/plan_refused.md)
- [`private_destination`](https://api.bymundi.com/problems/private_destination.md)
- [`quote_has_payments`](https://api.bymundi.com/problems/quote_has_payments.md)
- [`quote_sold`](https://api.bymundi.com/problems/quote_sold.md)
- [`rate_limited`](https://api.bymundi.com/problems/rate_limited.md)
- [`request_in_progress`](https://api.bymundi.com/problems/request_in_progress.md)
- [`root_type_mismatch`](https://api.bymundi.com/problems/root_type_mismatch.md)
- [`roster_locked`](https://api.bymundi.com/problems/roster_locked.md)
- [`route_not_found`](https://api.bymundi.com/problems/route_not_found.md)
- [`route_too_short`](https://api.bymundi.com/problems/route_too_short.md)
- [`stop_not_found`](https://api.bymundi.com/problems/stop_not_found.md)
- [`stored_content_invalid`](https://api.bymundi.com/problems/stored_content_invalid.md)
- [`template_error`](https://api.bymundi.com/problems/template_error.md)
- [`too_many_images`](https://api.bymundi.com/problems/too_many_images.md)
- [`too_many_packages`](https://api.bymundi.com/problems/too_many_packages.md)
- [`travelers_mismatch`](https://api.bymundi.com/problems/travelers_mismatch.md)
- [`trip_has_no_design`](https://api.bymundi.com/problems/trip_has_no_design.md)
- [`unauthorized`](https://api.bymundi.com/problems/unauthorized.md)
- [`undo_expired`](https://api.bymundi.com/problems/undo_expired.md)
- [`unknown_address`](https://api.bymundi.com/problems/unknown_address.md)
- [`unknown_image`](https://api.bymundi.com/problems/unknown_image.md)
- [`unknown_line`](https://api.bymundi.com/problems/unknown_line.md)
- [`unknown_package`](https://api.bymundi.com/problems/unknown_package.md)
- [`unknown_stop`](https://api.bymundi.com/problems/unknown_stop.md)
- [`unknown_template`](https://api.bymundi.com/problems/unknown_template.md)
- [`unprocessable`](https://api.bymundi.com/problems/unprocessable.md)
- [`unresolvable`](https://api.bymundi.com/problems/unresolvable.md)
- [`unsupported_media_type`](https://api.bymundi.com/problems/unsupported_media_type.md)
- [`upload_incomplete`](https://api.bymundi.com/problems/upload_incomplete.md)
- [`upload_missing`](https://api.bymundi.com/problems/upload_missing.md)
- [`upstream_unavailable`](https://api.bymundi.com/problems/upstream_unavailable.md)
