Inceptiva· SDKv0.4.0
API REFERENCE

Error handling

Specific errors inherit from the common API error type and preserve the HTTP status and detail.

StatusTypeTypical cause
401AuthenticationMissing, invalid, or rotated API key
403ForbiddenDisallowed IP or denied access
404Not foundUnknown agent or conversation
409ConflictReused idempotency key or request still in progress
422ValidationInvalid input or usage constraint
429Rate limitPer-minute limit exceeded
ts
try {
  await client.responses.create({ message: "Hello" });
} catch (error) {
  if (error instanceof InceptivaRateLimitError) console.error(error.retryAfter);
  else if (error instanceof InceptivaApiError) console.error(error.status, error.detail);
}

retryAfter supports both seconds and HTTP dates. SDKs do not retry automatically. Network and cancellation errors remain native to each runtime.

Every API error preserves status, functional code, readable message, and response metadata containing rate-limit and usage headers.

Functional codes

CategoryCodes
Authenticationmissing_api_key, invalid_api_key, ip_not_allowed
Limitsrate_limit_exceeded, rate_limit_unavailable, usage_limit_exceeded
Inputmessage_too_large, metadata_too_large, metadata_too_many_keys, metadata_too_deep, metadata_invalid_key, metadata_invalid_value, metadata_list_too_large
Idempotencyidempotency_key_reused, idempotency_request_in_progress
Conversationexternal_reference_mismatch, conversation_not_found
Generationgeneration_failed