Error codes¶
ReferenceFacts to look up.
Apinx — Error Reference¶
Generated from the error catalogue (go test ./src/apinx -run ErrorReference -args -update-errors). Do not edit by hand.
Every error the gateway or the Admin API answers with carries a stable code in the X-Apinx-Error header and a uniform JSON body: code, message, correlation_id (also in the log line), remediation and, when console.errors.verbose is on, details. The console's Error reference page shows the same catalogue and every error banner links to its code.
Routing (APX-RT-…)¶
No route or listener matched the request.
| Code | Status | Message | What to do |
|---|---|---|---|
APX-RT-0001 |
404 | No resource matches this request. | Check the path and method. In the console, the Traffic screen shows which route, if any, the request matched. |
APX-RT-0002 |
405 | The method is not allowed for this resource. | Use one of the methods listed in the Allow header. |
APX-RT-0003 |
400 | The request path is malformed. | Paths must be normalised: no '.' or '..' segments, no empty segments and no percent-encoded slashes. |
APX-RT-0004 |
400 | WebSocket upgrades are not enabled on this route. | Set websocket.enabled: true on the route if the backend speaks WebSocket. |
APX-RT-0005 |
502 | The backend did not complete the WebSocket handshake. | Check that the target accepts WebSocket connections on the forwarded path. The backend's response status is in the server log. |
APX-RT-0006 |
505 | WebSocket is only available over HTTP/1.1 on this listener. | Connect with HTTP/1.1; WebSocket over HTTP/2 is not supported. |
APX-RT-0007 |
403 | A policy rejected the request. | The rejecting policy and its reason are recorded in the request inspector. |
APX-RT-0008 |
429 | Too many WebSocket sessions are open on this gateway. | Close a session or try again later. In Apinx Cloud the plan sets how many may be open at once (Admin › Gateway lists it); the details give the limit. |
APX-RT-0009 |
508 | This request is itself an Apinx service callout and cannot start more. | A service callout points at an API that itself makes callouts, through this gateway or another Apinx (the request carries X-Apinx-Callout). Point the callout at the backend behind that API instead. |
APX-RT-0010 |
502 | This route has no backend and no policy answered the request. | A route without an upstream must carry a mock-response policy, or a service-callout with respond, that answers every request. Give the route an upstream or such a policy. |
Policies (APX-PL-…)¶
A policy on the matched route refused or could not process the request.
| Code | Status | Message | What to do |
|---|---|---|---|
APX-PL-0001 |
401 | The request carries no credentials. | Send the credential the route expects: an API key in the configured header, query parameter or cookie, a bearer token, or Basic credentials. |
APX-PL-0002 |
401 | The credentials are not valid. | The key, token or password was not recognised, has expired or was revoked. Obtain a current credential from the API owner. |
APX-PL-0003 |
403 | The caller is authenticated but not allowed to use this route. | The route requires a scope, a claim value or an application the caller does not have. The details name what is missing. |
APX-PL-0004 |
403 | Requests from this address are not allowed on this route. | The route has an IP allow or deny list. If the gateway sits behind a proxy, enable trust_x_forwarded_for on the policy so the real client address is checked. |
APX-PL-0005 |
405 | This method is not allowed on this route. | The Allow header lists the permitted methods. |
APX-PL-0006 |
413 | The request body is larger than this route accepts. | Send a smaller body or ask the API owner to raise the request size limit. |
APX-PL-0007 |
429 | The rate limit for this route has been reached. | Wait for the number of seconds in Retry-After, then try again. RateLimit-Limit and RateLimit-Reset describe the window. |
APX-PL-0008 |
503 | Too many requests are in flight on this route. | Retry after a short delay. The route bounds concurrent requests to protect the backend. |
APX-PL-0009 |
503 | The signing keys needed to verify tokens could not be fetched. | The jwt policy's JWKS URL, or the issuer's discovery document when no URL is set, did not answer or was refused. The gateway log names the address and the reason; check it and network access from the gateway. Requests fail closed until keys are available. |
APX-PL-0010 |
403 | The request origin is not allowed by the CORS policy. | Add the origin to the policy's origins list, or use * for any origin without credentials. |
APX-PL-0011 |
502 | The backend answered with an error. | The status is the backend's own. Check the backend's logs with the correlation id; the gateway replaced the body with this uniform format. |
APX-PL-0012 |
400 | The request body is not valid JSON, and this route transforms JSON bodies. | Send a JSON body with a matching Content-Type, or ask the API owner to set if_not_json to pass on the transform policy so other bodies go through untouched. |
APX-PL-0013 |
500 | The gateway could not transform the request body. | The transform policy's request.body program failed or exceeded its budget for this request; the request was not forwarded. The details name the reason. Check the program with the console preview against a body like this one. |
APX-PL-0014 |
502 | The gateway could not transform the backend's response. | The backend answered, but the transform policy's response program failed, the body was too large, not JSON, or compressed with an unsupported encoding; the client received this error instead of a partial body. The details name the reason. |
APX-PL-0015 |
403 | This application has no subscription to a product that includes this API. | Ask the API owner to subscribe your application to one of the products that include this API, at a plan. The details name the products. Calls must identify the application with its API key. |
APX-PL-0016 |
403 | This application's subscription is not active. | A pending subscription waits for the API owner's approval; a suspended one was paused by the API owner. The details give the state and the product; ask the API owner to approve or resume it. |
APX-PL-0017 |
429 | This application has used its plan's quota for the current period. | Wait until the time in X-Quota-Reset (Retry-After gives the seconds), or ask the API owner to move your subscription to a plan with a larger quota. |
APX-PL-0018 |
400 | The JSON body exceeds a structural limit of this API. | The details name the rule (depth, object entries, array length, string or key length) and its limit. Send a smaller or flatter document; the limits are set in the API's threat-protection policy. |
APX-PL-0019 |
400 | The XML body exceeds a structural limit of this API or declares a DTD. | The details name the rule (depth, elements, attributes, name or text length, dtd) and its limit. DTDs and entity declarations are refused to prevent XXE and entity expansion attacks. |
APX-PL-0020 |
400 | The request contains content this API refuses. | A threat-protection pattern matched. The details name the pattern and where it matched (path, a query parameter, a header or the body), never the content. If this is a legitimate value, ask the API owner to adjust the pattern or its targets. |
APX-PL-0021 |
413 | The request body is larger than this API accepts for its content type. | The details give the content type and the limit. Send a smaller body, or split it into several requests. |
APX-PL-0022 |
400 | The request body is not well-formed for its declared content type. | The body declares JSON or XML but does not parse. Check the Content-Type header and the document; the details give the position of the first error. |
APX-PL-0023 |
403 | This application may not call from this address. | The application, or this API key, is limited to listed source addresses. Call from an allowed address, or ask the API owner to add yours under Consumers. Behind a proxy, set trust_x_forwarded_for on the api-key policy so the real client address is checked. |
APX-PL-0024 |
410 | This version of the API has been retired. | Move to the successor version named in the details (the Link header gives its path). The API owner retired this version after deprecating it; Sunset gives the date. |
APX-PL-0025 |
403 | This version of the API is deprecated and takes no new subscribers. | Your application subscribed after this version was deprecated, so its subscription covers the newer versions only. Call the successor named in the details; applications that subscribed before keep access until the version is retired. |
APX-PL-0026 |
502 | The gateway could not obtain a token for the backend. | The backend's token endpoint refused the gateway's credentials or could not be reached, and no valid token was cached. The details name the endpoint and the reason. Check the upstream-auth policy's credentials and the endpoint's availability; callers can retry. |
APX-PL-0027 |
400 | A required header is missing or has a value that is not allowed. | Send the header named in the details with one of the allowed values. The API's documentation lists what every operation expects. |
APX-PL-0028 |
502 | A backend the gateway calls for this request did not answer as expected. | A required service callout failed: the details name the callout and the reason (a connection error, an unexpected status, the plan's cap). Mark the callout optional to answer without it, or fix the backend it calls; callers can retry. |
APX-PL-0029 |
504 | A backend the gateway calls for this request did not answer in time. | A required service callout timed out, or the callouts' deadline passed. The details name the callout and the limit. Raise its timeout or the policy's deadline within the plan, mark it optional, or speed the backend up. |
APX-PL-0030 |
502 | A backend the gateway calls for this request answered with a body it cannot use. | The callout's answer was larger than max_bytes or could not be decoded. The details name the callout and the limit. Raise max_bytes or have the backend answer with less. |
APX-PL-0031 |
403 | The request was refused by a service-callout rule. | A reject rule of the service-callout policy matched what a backend answered before the request was forwarded. The message in the details says why; the API owner wrote the rule. |
APX-PL-0032 |
502 | The composed answer could not be built. | The service-callout policy's respond program failed or produced no value; the details say why. Check the program against the callouts' answers in the request inspector. |
APX-PL-0033 |
400 | The token endpoint refused the request. | The answer's error says why, as OAuth 2 defines it: invalid_client (the client ID or secret is wrong, expired or revoked, or the address may not call), invalid_grant (the refresh token is unknown, expired or revoked), invalid_scope, unsupported_grant_type or invalid_request. Obtain a current client secret from the API owner, or sign in again with it. |
APX-PL-0034 |
400 | A refresh token that was already used came back, so its session was ended. | Each refresh token works once; keep the newest one the token endpoint returns. Sign in again with the client ID and secret. If the app did not send the old token twice, someone may hold a copy of it. |
APX-PL-0035 |
503 | The gateway cannot read the key that signs or verifies its access tokens. | Retry shortly. Operators: check the gateway log and that the store and the master key are available. |
APX-PL-0036 |
429 | Too many failed token requests from this client or address. | Wait for the seconds in Retry-After, then send the right client ID and secret. Ten failures in a minute block the client ID and the address for the rest of that minute. |
APX-PL-0037 |
400 | The request does not match the operation's schema. | The details say where (body, query, headers or path) and which rules failed, as JSON Schema reports them; fix the request to match the operation's documented shape. |
APX-PL-0038 |
503 | The gateway is holding as many request and response bodies in memory as it may at once. | Retry after a short delay (Retry-After). Policies that read a body (transform, validate, threat protection, SOAP, service callouts) hold it in memory while the request runs; many large bodies at the same moment reach the limit. Send smaller bodies, fewer at once, or ask the gateway's operator to raise the limit. |
APX-PL-0039 |
413 | The request has a value too long for one of this API's own patterns to read. | The details say where (the path, the query, the headers or the body) and the longest value the pattern reads. A regular expression written into the API, a threat-protection custom pattern or a path rewrite, costs time for every character it reads, and more for wide counted repeats such as {1,200}; a longer value is refused rather than let through unchecked or forwarded unrewritten. Send shorter values, or ask the API owner to simplify the pattern. |
APX-PL-0040 |
503 | The gateway's jq programs are holding as much memory as they may at once. | Retry after a short delay (Retry-After). A jq program (a transform, a status condition, a service callout's body or answer, a SOAP answer) holds its input and what it builds while it runs; many programs holding large values at the same moment reach the limit. Send smaller bodies, fewer at once, make the program keep less (pick the fields it needs before it collects them), or ask the gateway's operator to raise the body limit the share is counted from. |
SOAP backends (APX-SOAP-…)¶
A soap policy could not build the envelope from the request, the backend's answer could not be converted to JSON, or the backend answered a fault.
| Code | Status | Message | What to do |
|---|---|---|---|
APX-SOAP-0001 |
400 | The request body is not a JSON object, and this operation builds a SOAP request from one. | Send a JSON object with Content-Type application/json. The operation's documentation lists the fields its SOAP request template reads; an array, a bare value or text cannot fill it. |
APX-SOAP-0002 |
400 | The backend rejected the request. | The SOAP backend answered a Client (SOAP 1.1) or Sender (SOAP 1.2) fault: what was sent did not satisfy it. The fault's code, reason and detail are in the details when errors are verbose, and always in the request inspector. Check the fields against the operation's documentation. |
APX-SOAP-0003 |
502 | The backend answered with a fault. | The SOAP backend answered a Server (SOAP 1.1) or Receiver (SOAP 1.2) fault, or one with another code: a failure on its side. The fault's code, reason and detail are in the request inspector. Callers can retry; the API owner can check the backend's logs with the correlation id. |
APX-SOAP-0004 |
502 | The backend's answer is not a SOAP envelope the gateway can convert. | The answer was not XML, not a SOAP envelope, had no element at the configured unwrap path, was larger than max_response, or broke an XML limit of the soap policy (a DTD or entity declaration is always refused). The details say which. Check the backend's answer in the request inspector and the policy's response settings. |
APX-SOAP-0005 |
413 | The request body, or the SOAP envelope built from it, is larger than this operation accepts. | Send a smaller body, or ask the API owner to raise max_body on the operation's soap policy. |
APX-SOAP-0006 |
400 | The SOAP request template does not compile. | The soap policy's request (or headers) template is not well-formed XML once its references are filled, or uses a reference the operation cannot answer. The message names the line. Fix the template in the operation's policy and save again. |
Upstreams (APX-UP-…)¶
The backend could not be reached or answered badly.
| Code | Status | Message | What to do |
|---|---|---|---|
APX-UP-0001 |
503 | No healthy backend is available for this route. | Check the upstream's targets in the console: health checks may have ejected them, or every target's circuit breaker is open. Fix the backend or add targets. |
APX-UP-0002 |
503 | The backend is temporarily unavailable because its circuit breaker is open. | The breaker closes automatically after the open duration once probes succeed. Investigate the backend errors that opened it. |
APX-UP-0003 |
502 | The backend could not be reached. | Verify the target URL, network reachability and that the backend is listening. The server log has the connection error. |
APX-UP-0004 |
504 | The backend did not start responding within the configured time. | Increase timeouts.response_header on the upstream if the backend is legitimately slow, or fix the backend latency. |
APX-UP-0005 |
504 | The request exceeded the total time allowed. | Increase timeouts.total on the upstream or route. Streaming routes should set total: 0s. |
APX-UP-0006 |
502 | The backend returned an invalid response. | The backend sent a malformed HTTP response or closed the connection early. Check the backend logs. |
APX-UP-0007 |
503 | The backend failed and the retry budget is exhausted. | Too many requests are being retried, which indicates a backend outage rather than transient errors. Fix the backend; the budget refills automatically. |
APX-UP-0008 |
400 | The request could not be sent to the backend: a header holds a character HTTP does not allow. | A value from the request (a path or query parameter, a claim) was placed in a request header by a policy and contains a line break or another control character. Send the value without it. The backend was not called and is not at fault. |
Gateway configuration (APX-GW-…)¶
A configuration could not be applied.
| Code | Status | Message | What to do |
|---|---|---|---|
APX-GW-0001 |
500 | The gateway configuration file could not be read. | Check that the path exists and is readable by the Apinx process. |
APX-GW-0002 |
400 | The gateway configuration is not valid YAML. | Fix the syntax error at the reported line and column. |
APX-GW-0003 |
400 | The gateway configuration contains a field Apinx does not recognise. | Remove or correct the field named in this error. Field names are documented in docs/GATEWAY-CONFIG.md. |
APX-GW-0004 |
400 | The gateway configuration failed validation. | Each error names the object, the field and the rule that failed. Correct them and apply again. |
APX-GW-0005 |
400 | The gateway configuration declares an apiVersion or kind this build does not support. | Use apiVersion apinx/v1 and kind Gateway. |
APX-GW-0006 |
400 | The gateway configuration could not be compiled. | The error names the object and the cause. The previous configuration keeps serving. |
APX-GW-0007 |
400 | The OpenAPI document could not be parsed. | Provide an OpenAPI 3.0 or 3.1 document as JSON or YAML. |
APX-GW-0008 |
400 | The document is not a supported OpenAPI version. | Only OpenAPI 3.0.x and 3.1.x are supported. Swagger 2.0 documents must be converted first. |
APX-GW-0009 |
400 | The Postman collection could not be read. | In Postman, export the collection (… › Export) as Collection v2.1 and import that JSON file. |
APX-GW-0010 |
400 | The file is not a Postman collection that can be imported. | Postman Collection v2.0 and v2.1 are imported. Export a v1 collection again as v2.1; a Postman environment or a data dump is not a collection, and an OpenAPI document has its own import. |
APX-GW-0011 |
413 | The Postman collection is larger than the import limit. | Collections up to 3 MB are imported. Saved example responses take most of the space and are not imported: delete them, or export one folder at a time and import each as its own API. |
APX-GW-0012 |
400 | The gateway configuration references environment variables that are not set. | Set the variables named in the details before starting, or give each reference a default: ${NAME:-default}. |
APX-GW-0013 |
400 | The WSDL could not be read. | Save the service description as WSDL 1.1 (most SOAP stacks serve it at the service address with ?wsdl) and import that file whole. |
APX-GW-0014 |
400 | The file is not a WSDL 1.1 description that can be imported. | WSDL 1.1 with a SOAP 1.1 or SOAP 1.2 binding is imported. A WSDL 2.0 description has to be converted; an XML Schema on its own is imported through the WSDL that uses it; an OpenAPI document and a Postman collection have their own imports. |
APX-GW-0015 |
413 | The WSDL is larger than the import limit. | Descriptions up to 3 MB are imported. Embedded documentation and WS-Policy blocks take most of the space and are not imported: remove them, or split the services into one WSDL each. |
APX-GW-0016 |
400 | The gateway configuration references the process's own settings (APINX_* variables), which never belong in a gateway document. | A gateway file may read any environment variable except Apinx's own (APINX_*): the database connection strings and keys among them would be copied into the stored revision. Put the backend's values in variables of your own naming. |
Control plane and Admin API (APX-CP-…)¶
Configuration management, sign-in and set-up.
| Code | Status | Message | What to do |
|---|---|---|---|
APX-CP-0001 |
404 | The requested object does not exist. | Check the identifier. The object may have been deleted or belong to another environment. |
APX-CP-0002 |
409 | An object with this name already exists. | Names are unique within their kind. Choose another name or edit the existing object. |
APX-CP-0003 |
400 | The object failed validation. | Each issue names the field and the rule that failed. Correct them and try again. |
APX-CP-0004 |
401 | Sign in is required. | Sign in to the console, or send a valid bearer token obtained from POST /api/v1/auth/login. |
APX-CP-0005 |
403 | You do not have permission for this action. | Ask an administrator to grant your user the required role. |
APX-CP-0006 |
503 | This Apinx instance has not been set up yet. | Open the console and complete the set-up wizard with the claim token printed when Apinx started. |
APX-CP-0007 |
403 | The claim token is not valid. | Copy the token from the log line 'claim token' of the running instance. Restarting Apinx generates a new one. |
APX-CP-0008 |
409 | The draft is identical to the published configuration. | Make a change before publishing, or publish with force to record a revision anyway. |
APX-CP-0009 |
400 | The request body could not be read. | Send valid JSON matching the Admin API description at /api/v1/openapi.json. |
APX-CP-0010 |
409 | This instance has already been set up. | Sign in with an existing account. An administrator can invite further users. |
APX-CP-0011 |
401 | The email or password is incorrect. | Check the credentials and try again. After five failed attempts an account is locked for fifteen minutes and refuses every attempt, the right password included: wait, or ask an administrator to reset the password, which ends the lock. |
APX-CP-0012 |
500 | The revision was recorded but could not be applied to the data plane. | The data plane keeps serving the previous configuration. The server log has the cause; fix it and publish again. |
APX-CP-0013 |
409 | The object is referenced by other objects and cannot be deleted. | The error lists the referencing objects. Change or delete them first. |
APX-CP-0014 |
403 | The request is missing the header that protects cookie sessions. | Browser clients must send X-Requested-With: Apinx on every request that changes state. API clients should use a bearer token instead of the cookie. |
APX-CP-0015 |
429 | The account is temporarily locked after repeated failed sign-ins. | Wait fifteen minutes and try again, or ask an administrator to reset the password, which clears the lock. |
APX-CP-0016 |
409 | The last administrator cannot be removed or demoted. | Promote another user to admin first. |
APX-CP-0017 |
404 | This observability feature is disabled on this instance. | Enable inspector, analytics or access_log in apinx.yaml and restart. |
APX-CP-0018 |
409 | No running proxy listener to send the test request to. | Publish a configuration with at least one listener, then try again. |
APX-CP-0019 |
409 | The application already has a subscription that covers an API or operation this product offers. | An application holds at most one subscription covering a given operation, so it is always clear which plan a call counts against. The details name the conflicting subscription and what both offer (an API, or api/operation): change its plan, or revoke it first. |
APX-CP-0020 |
409 | The subscription cannot make this change in its current state. | Pending subscriptions can be approved or rejected; active ones suspended or revoked; suspended ones resumed or revoked. Revoked and rejected subscriptions are final. The details give the current state. |
APX-CP-0021 |
403 | Password sign-in is turned off; sign in with your organization's identity provider. | Use the "Continue with" button on the sign-in page. Only the break-glass administrator can use a password. |
APX-CP-0022 |
403 | Sign-in through the identity provider was refused. | The reason says which rule applied (e-mail domain, unverified e-mail, no mapped role, or an account bound to another identity). Ask an administrator to check Settings, Sign-in. |
APX-CP-0023 |
502 | The identity provider could not complete the sign-in. | Try again. If it keeps failing, an administrator can run the connection test in Settings, Sign-in; the reason names the failing step. |
APX-CP-0025 |
403 | This account is disabled. | Ask an administrator to enable the account again on the Users page. |
APX-CP-0026 |
503 | The configuration store cannot be reached. The gateway keeps serving traffic from the last deployed configuration. | Check the database server and the storage settings; the console works again as soon as the store answers. Nothing needs restarting. |
APX-CP-0027 |
413 | The request body is larger than the Admin API accepts. | Bodies are limited to 4 MiB. Split an import into smaller documents, or remove embedded OpenAPI text and upload it separately. |
APX-CP-0028 |
429 | Too many failed sign-ins from this address. | Wait for the time in Retry-After (up to fifteen minutes) and try again. The limit is per client address and separate from the account lock. |
APX-CP-0029 |
409 | Someone else deployed to this environment at the same moment, so your deployment was not made. | Nothing of yours was deployed and theirs is serving. Look at the Deployments page, then deploy again: yours is then made on top of theirs. |
APX-CP-0030 |
400 | The test request cannot be sent as written. | The note says which header or host is refused. Remove it and send the request again. |
Process configuration (APX-CFG-…)¶
The process configuration file or environment is invalid.
| Code | Status | Message | What to do |
|---|---|---|---|
APX-CFG-0001 |
500 | The configuration file could not be read. | Check that the path passed with --config exists and is readable by the Apinx process. |
APX-CFG-0002 |
400 | The configuration file is not valid YAML. | Fix the syntax error at the line and column reported, then reload. |
APX-CFG-0003 |
400 | The configuration contains a field that Apinx does not recognise. | Remove or correct the field named in this error. Field names are case sensitive and documented in the configuration reference. |
APX-CFG-0004 |
400 | A configuration value failed validation. | The error names the field and the rule that failed. Correct the value and reload. |
APX-CFG-0005 |
400 | An environment variable override could not be applied. | The variable name and expected type are in this error. Correct the value or unset the variable. |
APX-CFG-0006 |
409 | The configuration reload changed a setting that cannot be changed without a restart. | Hot-reloadable settings were applied. Restart Apinx to apply the remaining changes, or revert them. |
Assistant (APX-AI-…)¶
The console assistant (Enterprise in Apinx Cloud, and on premises).
| Code | Status | Message | What to do |
|---|---|---|---|
APX-AI-0001 |
409 | The assistant is not available here. | In Apinx Cloud the assistant comes with the Enterprise plan once MoznHub switches it on; on premises an administrator turns it on and sets the AI key in Admin › Assistant. The details give the reason. |
System (APX-SYS-…)¶
The process itself.
| Code | Status | Message | What to do |
|---|---|---|---|
APX-SYS-0001 |
500 | An internal error occurred. | Check the server log for the correlation ID shown in this response and the underlying cause. If it persists, report it with the log excerpt. |
APX-SYS-0002 |
503 | The server is shutting down. | Retry against another instance or after the restart completes. |
APX-SYS-0003 |
503 | The server is not ready to serve requests. | Wait for start-up to complete. The readiness endpoint lists the failing checks. |
APX-SYS-0004 |
500 | A component failed to start or stop. | The component name and cause are in the server log. Fix the cause and restart. |
APX-SYS-0005 |
403 | The licence does not allow changes right now; the console is read-only. | Open Admin › About: it names what is wrong (the evaluation ended, an evaluation licence expired, or the clock was set back during an evaluation) and how to put it right. Until then the console and the Admin API accept no change except a licence; deployed APIs keep serving traffic. |
APX-SYS-0006 |
400 | The licence was not accepted. | Paste the whole licence as issued, including the BEGIN and END lines. The reason names what failed: the format, the signature, the edition or the version it covers. |