Skip to main content

ServerError

@authgear/capacitor


@authgear/capacitor / ServerError

Class: ServerError

ServerError represents error received from the server.

Extends​

Constructors​

Constructor​

new ServerError(message, name, reason, info?): ServerError

Parameters​

message​

string

name​

string

reason​

string

info?​

unknown

Returns​

ServerError

Overrides​

AuthgearError.constructor

Properties​

info?​

optional info: unknown

Additional error information.


message​

message: string

Error message.

Remarks​

Error messages are provided for convenience, and not stable APIs; Consumers should use ServerError.name or ServerError.reason to distinguish between different errors.

Overrides​

AuthgearError.message


name​

name: string

Error name.

Remarks​

See ErrorName for possible values. New error names may be added in future.

Overrides​

AuthgearError.name


reason​

reason: string

Error reason.


underlyingError?​

optional underlyingError: unknown

underlyingError is the underlying error. The type is unknown because it is possible to throw anything in JavaScript. Use ordinary approaches, such as instanceof operator, to identify what it is.

Inherited from​

AuthgearError.underlyingError