Skip to main content

TypeAlias.ProblemDetails

type ProblemDetails = {
code?: | "BILLING_NO_CHARGEBEE_CUSTOMER"
| "BILLING_INVALID_ORG_METADATA"
| "BILLING_NO_ACTIVE_SUBSCRIPTION"
| "BILLING_CHARGEBEE_CUSTOMER_ALREADY_EXISTS"
| "BILLING_NO_OWNER_MEMBER"
| "BILLING_CHARGEBEE_API_ERROR"
| "BILLING_WEBHOOK_AUTH_FAILED"
| "BILLING_WEBHOOK_INVALID_PAYLOAD"
| "ONBOARDING_USER_ALREADY_IN_ORG"
| "ONBOARDING_CHECKOUT_NOT_COMPLETED"
| "ONBOARDING_HOSTED_PAGE_USER_MISMATCH"
| "ONBOARDING_ORG_SLUG_TAKEN"
| "DPP_CERTIFICATION_KEY_NOT_FOUND"
| "DPP_DID_WEB_DOMAIN_NOT_CONFIGURED"
| "DPP_DID_WEB_DOMAIN_ALREADY_TAKEN"
| "DPP_CLAIM_NOT_ALLOWED"
| "DPP_PASSPORT_DUPLICATE_REFERENCE"
| "DPP_PASSPORT_SOURCE_READ_ONLY"
| "DPP_MINT_JOB_NOT_FOUND"
| "DPP_PASSPORT_NOT_PUBLISHED"
| "DPP_VC_NOT_YET_CERTIFIED"
| "DPP_VC_IPFS_UNAVAILABLE"
| "IMPORT_MAPPER_DUPLICATE_NAME"
| "DPP_SHOPIFY_INVALID_SHOP_DOMAIN"
| "DPP_SHOPIFY_SHOP_ALREADY_LINKED"
| "DPP_SHOPIFY_INVALID_WEBHOOK_SIGNATURE"
| "DPP_SHOPIFY_UNHANDLED_WEBHOOK_TOPIC"
| "INVEST_IDENTITY_NOT_FOUND"
| "INVEST_IDENTITY_ALREADY_EXISTS"
| "INVEST_CANNOT_DELETE_OLDEST_NAV"
| "INVEST_SHARES_BELOW_DISTRIBUTED"
| "INVEST_FUND_NOT_ACTIVE"
| "INVEST_INVESTOR_REJECTED_KYC"
| "INVEST_NOT_ENOUGH_FUND_SHARES"
| "INVEST_FUND_LOCKUP_PERIOD"
| "INVEST_INVESTOR_LOCKUP_PERIOD"
| "INVEST_NOT_ENOUGH_AVAILABLE_SHARES"
| "INVEST_SECONDARY_MARKET_DISABLED"
| "INVEST_KYC_REQUIRED"
| "ORG_CROSS_ACCESS_DENIED"
| "AUTH_UNAUTHENTICATED"
| "AUTH_SUPER_ADMIN_REQUIRED"
| "AUTH_INSUFFICIENT_PERMISSIONS"
| "AUTH_MISSING_ORG_ID"
| "AUTH_MISSING_SDK_NETWORK_HEADER"
| "AUTH_INVALID_API_KEY"
| "AUTH_SESSION_APP_MISMATCH"
| "LOYALTY_FIRST_ASSIGNMENT_EXISTING"
| "ACCOUNT_REWARD_TIER_NOT_FOUND"
| "LOYALTY_ACCOUNT_NOT_FOUND"
| "LOYALTY_REWARD_TIER_DUPLICATE_VISITS"
| "LOYALTY_STELLAR_ONLY"
| "LOYALTY_ZELTY_NOT_CONFIGURED"
| "LOYALTY_ZELTY_ORDER_VERIFICATION_FAILED"
| "LOYALTY_ZELTY_WEBHOOK_INVALID_SIGNATURE"
| "AGENT_WALLET_SESSION_REQUIRED"
| "AGENT_WALLET_NO_ONCHAIN_ADDRESS"
| "AGENT_WALLET_NETWORK_UNSUPPORTED"
| "AGENT_WALLET_DEPLOYING"
| "AGENT_SIGNER_NOT_AGENTIC"
| "AGENT_SIGNER_NOT_READY"
| "AGENT_SIGNER_NO_COMMITMENT"
| "AGENT_SIGNER_JOB_NOT_FOUND"
| "AGENT_SIGNER_JOB_FORBIDDEN"
| "AGENT_API_KEY_REQUIRED"
| "AGENT_API_KEY_NOT_BOUND"
| "IMPORT_JOB_NOT_FOUND"
| "CLIENT_SHARE_NO_APPLICATION"
| "ACCOUNT_SDK_CONTEXT_MISSING"
| "SIGNER_NO_AUTH_CONTEXT"
| "SIGNER_INVALID_DKG_ROUND"
| "SIGNER_RELAY_EVM_ONLY"
| "SIGNER_ACCOUNT_NOT_REGISTERED"
| "SIGNER_APPLICATION_REQUIRED";
detail: string;
instance?: string;
param?: string;
params?: Record<string, string | number>;
status?: number;
title?: string;
type: string;
};

RFC 7807 Problem Details for HTTP APIs.

A machine-readable format for specifying errors in HTTP API responses. Standardizes error responses across the Keyban API with consistent structure.

All fields except detail are optional but recommended for clarity. The detail field contains the primary human-readable error message.

Type Declaration

NameTypeDescription
code?"BILLING_NO_CHARGEBEE_CUSTOMER"
detailstringHuman-readable explanation specific to this occurrence of the problem. Always English — clients use code + params to render a localized message and fall back to this string if the code is unknown.
instance?stringURI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
param?stringRFC 7807 extension member: identifies the invalid request parameter. Used by the frontend to highlight the erroneous form field.
params?Record<string, stringnumber>
status?numberHTTP status code generated by the origin server for this occurrence. Convenient way to make problem details self-contained.
title?stringShort, human-readable summary of the problem type. SHOULD NOT change from occurrence to occurrence of the problem.
typestringURI reference that identifies the problem type. When dereferenced, it SHOULD provide human-readable documentation. Defaults to "about:blank" for generic problems.

See

Example

// Parsing error responses from the API
const response = await fetch('/v1/llm/chat/completions', {
method: 'POST',
body: JSON.stringify({ model: 'gemini-2.5-flash-lite', messages: [] })
});

if (!response.ok) {
const error: ProblemDetails = await response.json();
console.error(error.detail); // "Invalid request: The 'messages' field must contain at least one message."
console.log(error.status); // 400
console.log(error.title); // "Bad Request"
}