Skip to main content

Error response format

The WikiParfum API returns errors in the standard GraphQL error format. Every GraphQL error carries a message and an extensions object with a machine-readable code. Branch on extensions.code — never on message, whose wording can differ for the same code. The HTTP status of a response follows the error it contains, so a response can be 404 or 500 and still carry a GraphQL body. Always parse the body, whatever the status.
Rate-limited requests are the exception: they return HTTP 429 with a plain JSON body that is not a GraphQL response. Check the HTTP status before reading errors. See Rate limiting.
There are two shapes, depending on when the error happens.

Request-level errors

Errors raised before any field is resolved — while authenticating the request, or because the query itself is invalid — reject the whole request. The response has no data key. Authentication errors also prefix the message with Context creation failed: :

Field-level errors

Errors raised while resolving a field return null for that field, alongside the error. Other fields in the same request can still return data, so check both data and errors. The path of each error names the field that failed:

Error codes

Authentication

Request-level. The request never reaches your query.

Invalid queries

Request-level. The query or its variables are rejected before execution.

Field errors

Field-level. The failed field is null; other fields may still return data. Some queries report invalid arguments with a descriptive sentence as both the message and the code — for example Ingredient not found or You must provide an ingredient or an ingredientSlug — with HTTP 500. These are caused by the request, not by the server: fix the arguments instead of retrying.

Handling errors in your integration

Authentication errors

If you receive NO_APIKEY or USER_NOT_FOUND, verify that:
  • The Authorization header is present in every request and contains the raw API key (no Bearer prefix).
  • The API key is correct and has not been rotated.
Do not retry. The request will keep failing until the key or header is fixed.

Access errors

If you receive LOCATION_NOT_ALLOWED, the request is coming from an IP address that is not on your allowlist. Do not retry. Contact your ScentXP account manager to add your server IPs. If you receive INSTALLATION_SUSPENDED, access for your integration has been suspended. Do not retry. Contact your ScentXP account manager.

Not found errors

Codes ending in _NOT_FOUND mean the requested entity does not exist or is not available to your integration. Do not retry. Verify the ID, slug or EAN you are using.

Invalid queries

HTTP 400 means the request itself is invalid. Do not retry. Fix the query, its variables or the request body. Exploring the Schema shows how to check field and argument names.

Transient errors

SEARCH_SERVICE_UNREACHABLE, SEARCH_SERVICE_UNAVAILABLE, SEARCH_SERVICE_BAD_RESPONSE and a request-level INTERNAL_SERVER_ERROR with HTTP 500 indicate a temporary failure on the ScentXP side. Retry with exponential backoff.

Internal errors

INTERNAL_SERVER_ERROR always comes with the message Internal server error; the API never exposes internal details such as database errors or stack traces. Use the HTTP status to decide what to do:
  • HTTP 400 — the query is invalid. See Invalid queries.
  • HTTP 500 — a temporary failure. Retry with exponential backoff.
  • HTTP 200 — one field failed while the rest of the request succeeded. Check the arguments of the failed field first: for example, asking for brands or perfumes that your integration’s access rules exclude fails this way. If the arguments are correct, retry once.
If an error persists, contact your ScentXP account manager with the query you are executing, the HTTP status and the approximate timestamp (UTC), so the ScentXP team can find the full error in the server logs.