Class: EvalwrightApiError
The server answered, and the answer was a refusal. Branch on EvalwrightApiError.code, which is stable, rather than on the message.
Extends
Error
Constructors
Constructor
ts
new EvalwrightApiError(
status,
code,
message,
details?
): EvalwrightApiError;Parameters
status
number
HTTP status of the refusal.
code
string
Machine-readable code, e.g. VALIDATION_ERROR, UNAUTHORIZED.
message
string
details?
unknown
Extra context when the server can give it, e.g. the missing variable.
Returns
EvalwrightApiError
Overrides
ts
Error.constructorProperties
cause?
ts
optional cause?: unknown;Inherited from
ts
Error.causecode
ts
readonly code: string;Machine-readable code, e.g. VALIDATION_ERROR, UNAUTHORIZED.
details?
ts
readonly optional details?: unknown;Extra context when the server can give it, e.g. the missing variable.
message
ts
message: string;Inherited from
ts
Error.messagename
ts
name: string;Inherited from
ts
Error.namestack?
ts
optional stack?: string;Inherited from
ts
Error.stackstatus
ts
readonly status: number;HTTP status of the refusal.