Skip to Content
DocsSDKs & LibrariesError Handling

SDK Error Handling

All clients distinguish API failures from a successful data response. The exact error type follows the language.

SDKAPI errorStatus propertyResponse property
JavaScript / TypeScriptNukleioApiErrorstatusresponseBody
ReactError from the core client in contextinspect NukleioApiErrorresponseBody
PythonNukleioApiErrorstatus_coderesponse_body
JavaNukleioApiExceptionstatus-code getterresponse-body getter
.NETNukleioApiExceptionStatusCodeResponseBody
Go*APIErrorStatusCodeBody

Common failures

StatusMeaningWhat to do
401The key is missing, malformed, expired, or invalid.Verify the environment variable, rotate the key if needed, and retry with the new value.
500Nukleio could not complete the request.Retry later with bounded backoff.
200 with an invalid bodyThe response did not contain a valid userInfo.Record the SDK error and response body, then report the unexpected response.

Network errors, timeouts, and cancellations may use native runtime errors instead of an HTTP status. Do not retry a deliberately cancelled request.

Retry guidance

Retry transient network failures and 500 responses with exponential backoff and a small amount of random jitter. Do not automatically retry 401 responses: the credential must be corrected first. Keep retry counts bounded so a failing integration does not overwhelm the service.

Never log a complete API key. Response bodies may also contain details that should not be exposed to visitors, so send diagnostics to protected server logs rather than rendering them directly.

Last updated on