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
Properties
code
readonlycode:string
Defined in: packages/core/src/errors/ZerotalError.ts:18
Inherited from
status
readonlystatus:number=500
Defined in: packages/core/src/errors/ZerotalError.ts:19
Inherited from
context?
readonlyoptionalcontext?:Record<string,unknown>
Defined in: packages/core/src/errors/ZerotalError.ts:20