AuthResponse
Defined in: packages/auth/src/types/response.ts:26
Discriminated result shape returned by every public AuthClient
method. Extends the generic APIResponse<T> from @eventista/sdk-api-client
with a stable, semantic code from AUTH_ERROR_CODES.
- When
isErrisfalse,datais set andcode/errorCode/errare allundefined. - When
isErristrue,code(SDK semantic code) is set,errorCode(raw upstream code, when available) is set,errcarries the human message, anddataisundefined.
Consumers branch on result.isErr and then on result.code. The raw
errorCode is exposed unchanged so it can be surfaced in support
tickets without parsing the message.
Extends
Section titled “Extends”APIResponse<T>
Type Parameters
Section titled “Type Parameters”T
Properties
Section titled “Properties”
optionalcode?:AuthErrorCode
Defined in: packages/auth/src/types/response.ts:31
Stable, semantic auth error code from AUTH_ERROR_CODES. Only
present when isErr is true.
optionaldata?:T
Defined in: packages/api-client/dist/index.d.ts:177
Inherited from
Section titled “Inherited from”APIResponse.data
optionalerr?:string
Defined in: packages/api-client/dist/index.d.ts:175
Inherited from
Section titled “Inherited from”APIResponse.err
errorCode?
Section titled “errorCode?”
optionalerrorCode?:string|number
Defined in: packages/api-client/dist/index.d.ts:176
Inherited from
Section titled “Inherited from”APIResponse.errorCode
isErr:
boolean
Defined in: packages/api-client/dist/index.d.ts:174
Inherited from
Section titled “Inherited from”APIResponse.isErr