aYOUne
translate
Not in your language

This page is not yet available in en. You're reading the de version.

Error Codes

Wenn ein API-Call fehlschlägt, antwortet aYOUne mit einem strukturierten Fehler-Envelope. Dieser Guide erklärt die wichtigsten HTTP-Codes und zeigt, wie du den Fehler programmatisch auswertest.

Fehler-Envelope

Auch im Fehlerfall hält die Plattform am Standard-Format fest:

{
  "payload": {
    "error": {
      "code": "VALIDATION_FAILED",
      "message": "Field 'email' is required",
      "field": "email",
      "debugId": "01J7XYZ..."
    }
  },
  "meta": { "version": "2026.50.0", "debugId": "01J7XYZ..." }
}

Wichtig:

  • payload.error.code ist eine stabile interne Kennung — nutze sie in deinem Error-Handling, nicht die message (die kann sich lokalisieren).
  • meta.debugId ist eine ULID, die in ayounelogs (Winston-Log-Collection mit ~1h TTL) auffindbar ist. Bei Tickets an Tolinax-Support immer mitschicken.

Statuscodes

HTTP code Bedeutung
400 BAD_REQUEST Generisch — fehlerhafte Query
400 VALIDATION_FAILED Ein oder mehrere Felder ungültig (payload.error.fields[])
401 UNAUTHORIZED Token fehlt/ungültig/abgelaufen
401 TOKEN_EXPIRED Access-Token abgelaufen — refreshe
403 FORBIDDEN Token gültig, aber Right fehlt
403 LICENSE_BLOCKED Modul nicht im Customer-Paket
404 NOT_FOUND Datensatz oder Route existiert nicht
409 CONFLICT Eindeutigkeit verletzt (z.B. doppelter Slug)
410 GONE Endpoint deprecated und entfernt
422 UNPROCESSABLE Schema-OK, Business-Rule verletzt
429 RATE_LIMITED Tokens-Bucket leer; siehe Retry-After
500 INTERNAL_ERROR Plattform-Bug — wird als Task (Type=Bug) persistiert
502/503 UPSTREAM_DOWN Modul-API nicht erreichbar

Retry-Strategie

Nicht jeder Fehler ist es wert, retried zu werden:

Code Retry? Strategie
4xx (außer 429) nein Code anpassen
401 ja erst refresh, dann retry
429 ja Retry-After-Header beachten
5xx ja exponential backoff, max 3 Versuche

Das offizielle TypeScript-SDK implementiert diese Logik bereits.

Beispiel: Robustes Error-Handling

try {
  const consumer = await client.crm.consumers.create({ email: "" });
} catch (err) {
  if (err.response?.status === 400 && err.response?.data?.payload?.error?.code === "VALIDATION_FAILED") {
    const fields = err.response.data.payload.error.fields;
    console.error("Bitte fehlerhafte Felder korrigieren:", fields);
  } else if (err.response?.status === 401) {
    await client.auth.refresh();
    // retry
  } else {
    console.error("Unerwarteter Fehler — debugId:", err.response?.data?.meta?.debugId);
  }
}

Errors als Tasks

Plattform-interne 5xx-Fehler werden zusätzlich als tasks-Records mit type: "Bug" persistiert (Plattform-Konvention) — sie tauchen also auch im CRM-Modul auf, sind aber Read-Side-gefiltert. Mehr im Admin-Handbook.

Work with this page

Ready-made instructions for your AI tool. Copy, paste, go — the AI fetches the content itself via the address in the text.

Summarise the steps for me The essentials, in the right order.
Read the following documentation by tolinax UG and work with it.

This page: https://ayoune.com/en/docs/developer-portal/error-codes.md
The complete collection: https://ayoune.com/en/docs/developer-portal.md

Summarise the content for me.

- First, in two sentences: what is this about?
- Then the steps in the order I need to take them.
- One line per step, in plain language.
- At the end: what I should have ready beforehand.

Leave out nothing I need in order to actually finish.
A note on sources:
- Every page of this documentation is available as Markdown (the same address with `.md`).
- A machine-readable overview of all public content is at `/llms.txt`.
- If you have access to the aYOUne MCP server, you can work against live data
  instead of this snapshot. If not, ignore this point.
Help me set this up Step by step, asking me as you go.
Read the following documentation by tolinax UG and work with it.

This page: https://ayoune.com/en/docs/developer-portal/error-codes.md
The complete collection: https://ayoune.com/en/docs/developer-portal.md

Walk me through the setup step by step.

- First tell me what I need to have ready (access, data, time).
- Then take me through ONE step at a time. Wait for my "next".
- For each step, say how I can tell that it worked.
- If something goes wrong, ask me for the exact message instead of guessing.

If the instructions leave a point open, tell me so rather than inventing it.
A note on sources:
- Every page of this documentation is available as Markdown (the same address with `.md`).
- A machine-readable overview of all public content is at `/llms.txt`.
- If you have access to the aYOUne MCP server, you can work against live data
  instead of this snapshot. If not, ignore this point.
Help me with a problem Narrow down the cause instead of guessing.
Read the following documentation by tolinax UG and work with it.

This page: https://ayoune.com/en/docs/developer-portal/error-codes.md
The complete collection: https://ayoune.com/en/docs/developer-portal.md

Help me narrow down a problem.

- First ask me what I observe and what I expected instead.
- From that, derive the most likely causes consistent with this source.
- For each cause, give me ONE test that confirms or rules it out.
- Order them so the cheapest test comes first.

Do not guess. If the source does not cover the problem, tell me where I should
look next.
A note on sources:
- Every page of this documentation is available as Markdown (the same address with `.md`).
- A machine-readable overview of all public content is at `/llms.txt`.
- If you have access to the aYOUne MCP server, you can work against live data
  instead of this snapshot. If not, ignore this point.
Explain it in plain words No jargon, from the ground up.
Read the following documentation by tolinax UG and work with it.

This page: https://ayoune.com/en/docs/developer-portal/error-codes.md
The complete collection: https://ayoune.com/en/docs/developer-portal.md

Explain the content so that someone without prior knowledge understands it.

- Start with the purpose: why does this exist at all?
- Explain technical terms in half a sentence on first use.
- One everyday comparison where it genuinely holds — none where it limps.
- At the end: the three things worth remembering.

Do not shorten by dropping conditions. A simplification that hides a
prerequisite is a false statement.
A note on sources:
- Every page of this documentation is available as Markdown (the same address with `.md`).
- A machine-readable overview of all public content is at `/llms.txt`.
- If you have access to the aYOUne MCP server, you can work against live data
  instead of this snapshot. If not, ignore this point.
A checklist to tick off To follow along while you do it.
Read the following documentation by tolinax UG and work with it.

This page: https://ayoune.com/en/docs/developer-portal/error-codes.md
The complete collection: https://ayoune.com/en/docs/developer-portal.md

Turn this into a **tick-off checklist** for practical use.

- Exactly one action per item, in the imperative.
- Order it so that no item depends on a later prerequisite.
- Prerequisites and pitfalls as indented sub-items.
- End with an acceptance step: how do I know everything is right?
A note on sources:
- Every page of this documentation is available as Markdown (the same address with `.md`).
- A machine-readable overview of all public content is at `/llms.txt`.
- If you have access to the aYOUne MCP server, you can work against live data
  instead of this snapshot. If not, ignore this point.
Build it into my project Concrete code for my use case.
Read the following documentation by tolinax UG and work with it.

This page: https://ayoune.com/en/docs/developer-portal/error-codes.md
The complete collection: https://ayoune.com/en/docs/developer-portal.md

Help me build this into my project.

- First ask me about language, environment and what I am trying to achieve.
- Then give a minimal, runnable example — no ellipses standing in for code.
- Name the error cases I must handle and how they surface.
- State the limits: timeouts, quotas, permissions.

Use only what the source actually describes. Do not invent fields, parameters
or endpoints — an invented call costs me more time than it saves.
A note on sources:
- Every page of this documentation is available as Markdown (the same address with `.md`).
- A machine-readable overview of all public content is at `/llms.txt`.
- If you have access to the aYOUne MCP server, you can work against live data
  instead of this snapshot. If not, ignore this point.

Was this article helpful?

👎 No (0)
Leave a comment