๐งฏNexus API Troubleshooting
Start with the HTTP status, content type, x-request-id, and x-error-code when the response actually contains the ordinary JSON error envelope. A 408, 413, or malformed-request response may be envelope-free, so preserve bounded body text and do not assume error_code exists.
The architecture figure turns a vague failure into a public consumer decision: credential failures stop reconnect loops, retryable reads stay bounded, and event disconnects use a validated cursor only under the provider's published retention/reset contract rather than by guessing state.
The sequence preserves the provider boundary: the consumer can correct its key handling and retry policy, while service-side projection or deployment problems are reported with the request id rather than diagnosed through unpublished internals.
At a glance
401 missing or invalid key
The credential was absent, malformed, revoked, or expired
Confirm the exact server-side header and ask the provider to rotate the key
403 insufficient scope
The key is valid but does not cover this resource family
Request the smallest additional scope through the provider's secure channel
404 detail path
The deployment has no indexed row for that identifier
Check the deployment URL and network identity before retrying
408 without JSON
The request exceeded the service timeout layer
Narrow filters or page size and retry once under the read policy
413 without JSON
The request or response exceeded a body limit
Reduce the request or page before retrying
429
A scoped bucket is empty
Honor Retry-After or ratelimit-reset with bounded backoff
5xx
Hosted projection or transport failure
Preserve x-request-id, retry idempotent reads, and report repeated failure to the provider
Empty list
The query matched nothing or projection state is behind
Verify filters, wait for indexed state, and re-read
Stream prints nothing
The network may be quiet, or the request may have been rejected before streaming
Check the HTTP status first; observe keep-alives only after a 200 response
Stream disconnects
The transport closed or the service restarted
Reconnect with the last validated id when the provider contract supports it, validate/deduplicate frames, and re-read affected REST state
Empty is an answer, sometimes
A 200 list with empty items means the query completed and matched no projected rows. A new on-chain change may arrive on the event stream before the projection and response cache show it. Keep the last event id, mark the UI as syncing, and re-read instead of turning an empty page into a deletion claim.
A 404 detail response means this deployment does not know the identifier. Check that the provisional URL points at the intended network and that the resource family is covered by the key scope.
A silent stream
Keep-alive comments distinguish a quiet 200 stream from a dead connection. EventSource hides comments by design, while curl can display them; cadence is provider-specific. An unknown kinds filter is rejected with HTTP 400 and INVALID_FILTER_VALUE; it is not a silent stream. A cursor from a different deployment or beyond retention can be clamped or rejected according to the provider's public behavior; validate and deduplicate frames, discard a rejected cursor, and start at the current tip only when the provider documents that recovery. Use /openapi.json and the provider's retention/reset policy as the authority.
Treat a 401 or 403 stream response as fatal until the provider corrects the credential. Treat a disconnect, 408, 429, or 5xx as retryable only with bounded backoff. On every reconnect, persist a cursor only after parsing and validating a complete event frame; if the provider rejects that cursor, clear it before restarting rather than looping on the same request.
Relay and browser failures
If the browser sees x-api-key, the relay boundary is broken: remove the key from browser code and keep it in the server process. If the relay returns unexpected cookies, redirects, authentication challenges, CSP, upstream cache, or body-framing headers, restore the allowlist policy from the dApp guide and rerun its relay tests.
If a response is rendered as markup or an event contains an unexpected shape, close the stream, validate JSON and bounded fields, and show a retry action. Use text nodes or framework text rendering rather than inserting service strings as HTML.
When to contact the provider
Include the provisional URL, endpoint path, timestamp, status, bounded response detail, x-request-id, and last event id. Never include the API key or other secret. Repeated projection lag, unexplained 5xx responses, or a schema mismatch belongs with the service provider because the consumer has no public operational access.
Next
Return to Step 1 โ Configure Hosted API Access to re-establish the secret boundary, or consult the document.
Last updated

