Error thrown when the MyAccount API returns a non-2xx response.

Example

try {
await myAccount.getAuthenticationMethods();
} catch (err) {
if (err instanceof MyAccountApiError) {
console.error(err.status, err.title, err.detail);
}
}

Hierarchy

  • Error
    • MyAccountApiError

Constructors

Properties

detail: string

Human-readable explanation specific to this occurrence

status: number

HTTP status code

title: string

Short human-readable summary of the error

type: string

RFC 7807 error type identifier

validation_errors?: {
    detail: string;
    field?: string;
    pointer?: string;
    source?: string;
}[]

Field-level validation errors, if present

Type declaration

  • detail: string
  • Optional field?: string
  • Optional pointer?: string
  • Optional source?: string