Skip to main content
zerotal

Documentation


Documentation / zerotal / session / SessionError

Class: SessionError

Defined in: packages/session/src/errors.ts:8

Base class for all @zerotal/session errors; extends the framework's ZerotalError. Catch this to handle any session failure generically. Defaults: code E_SESSION, HTTP status 500.

Extends

Extended by

Constructors

Constructor

new SessionError(message, code?, status?, context?): SessionError

Defined in: packages/session/src/errors.ts:15

Parameters

message

string

Human-readable error message.

code?

string = "E_SESSION"

Machine-readable error code. Default: "E_SESSION".

status?

number = 500

HTTP status to surface. Default: 500.

context?

Record<string, unknown>

Optional structured context attached to the error.

Returns

SessionError

Overrides

ZerotalError.constructor

Properties

code

readonly code: string

Defined in: packages/core/src/errors/ZerotalError.ts:18

Inherited from

ZerotalError.code


status

readonly status: number = 500

Defined in: packages/core/src/errors/ZerotalError.ts:19

Inherited from

ZerotalError.status


context?

readonly optional context?: Record<string, unknown>

Defined in: packages/core/src/errors/ZerotalError.ts:20

Inherited from

ZerotalError.context