Reference
Error codes

Error codes

All Bissap SDK errors follow a consistent JSON shape:

{
  "error": {
    "code": "ERROR_CODE",
    "message": "Human-readable description"
  }
}

Core Enforcement Codes (Stable Across SDKs)

These codes represent the stable enforcement surface and are consistent across Node and Python implementations.

CodeHTTPDescription
UNAUTHORIZED401Missing or invalid API key.
FORBIDDEN403Key is valid but lacks the required scope for this intent.
INTENT_NOT_FOUND404The requested intent is not registered. With strictIntents: true, returned for any unknown intent.
INTENT_VALIDATION_ERROR400Payload failed schema validation.
INTENT_RESULT_VALIDATION_ERROR500Handler returned output that failed result schema validation.
VALIDATION_ERROR400General request validation failure.
RATE_LIMITED429Per-key rate limit exceeded. Back off and retry.
NOT_FOUND404Resource not found.

Node-Specific Codes

CodeHTTPDescription
INTENT_HANDLER_ERROR500Intent handler threw an unhandled error. Message is intentionally generic.
INTERNAL_ERROR500Unexpected server error.
FORBIDDEN_SCOPE403Granular scope mismatch variant.

Python-Specific Codes

CodeHTTPDescription
CLOUD_ERROR502Cloud control plane unreachable.
CONFIG_ERROR500Missing required configuration.
DENIED403Key denied via local denylist.
INVALID_JSON400Request body is not valid JSON.

Language implementations may expose additional internal classification codes. These do not change enforcement guarantees and may be unified in a future minor release.

Custom error codes from handlers

Intent handlers can throw errors with a .code property to return structured errors:

// In your intent handler:
throw Object.assign(new Error('Item not found'), { code: 'NOT_FOUND' });
// → { "error": { "code": "NOT_FOUND", "message": "Item not found" } }

The Node SDK wraps handler errors in INTENT_HANDLER_ERROR by default. If the thrown error has a .code property, it's used instead, giving you clean, domain-specific error codes without leaking stack traces.