src/app/core/session/session-expired.error.ts

Description

The server rejected the session (401), and it could not be renewed: thrown by RemotePouchDatabase after a failed renewal, and converted from a 401 "exp not in future" by the database layer and the HTTP interceptor.

Extends

TypedError

Relationships

Used by

No results matching.

Depends on

Index

Properties

Constructor

constructor(message: string, options?: TypedErrorOptions)
Parameters :
Name Type Optional
message string No
options TypedErrorOptions Yes

Properties

Readonly classification
Type : ErrorClassification
Inherited from TypedError

The kind of failure: an own property, so that a copy of the error that lost its class (as PouchDB's createError() makes) still has it.

Readonly Optional status
Type : number
Inherited from TypedError

The HTTP status of the failed request, if any.

Readonly Optional details
Type : Record<string, unknown>
Inherited from NamedError

Context for the report, kept out of the message so that it does not split the issue.

import {
  TypedError,
  TypedErrorOptions,
} from "#src/app/core/logging/error-classification";

/**
 * The server rejected the session (401), and it could not be renewed: thrown by
 * `RemotePouchDatabase` after a failed renewal, and converted from a 401
 * "exp not in future" by the database layer and the HTTP interceptor.
 */
export class SessionExpiredError extends TypedError {
  constructor(message: string, options?: TypedErrorOptions) {
    super("SessionExpiredError", "session-expired", message, options);
  }
}

results matching ""

    No results matching ""