Skip to content

Interface: NosanaApiError

Error shape every kit request rejects with, once it has reached the server and come back with a status. statusCode is guaranteed (it comes from the response), so consumers can branch on it without casting — narrow with isNosanaApiError.

Extends

Properties

PropertyTypeDescriptionInherited from
code?stringFree-form server machine code, when present. May be an IdempotencyCode (a control signal) or another domain code — so do not assume it is one of the idempotency codes. Use isIdempotencyControlSignal to detect and narrow to the idempotency control codes.-
details?unknown--
messagestring-Error.message
namestring-Error.name
retryAfter?numberRetry-After in seconds, when the header was present.-
stack?string-Error.stack
statusCodenumberHTTP status (body.statusCode ?? response.status).-