Documentation / @zerotal/session / SessionCookieOverflowError
Class: SessionCookieOverflowError
Defined in: session/src/errors.ts:49
Thrown by CookieDriver.saveSession when the serialized session cookie
would exceed the 4096-byte limit browsers enforce per cookie (RFC 6265 §6.1).
Anything larger is silently truncated or dropped by the client — corrupting or
losing the session — so the driver refuses to emit it instead. Store bulky
data server-side (Redis driver, cache, database) and keep only identifiers in
the session. Code E_SESSION_COOKIE_OVERFLOW, status 500; the actual and
limit byte counts are attached as context.
Extends
Constructors
Constructor
new SessionCookieOverflowError(
size,limit):SessionCookieOverflowError
Defined in: session/src/errors.ts:54
Parameters
size
number
Serialized cookie size in bytes.
limit
number
The enforced maximum (4096) in bytes.
Returns
SessionCookieOverflowError
Overrides
Properties
code
readonlycode:string
Defined in: core/src/errors/ZerotalError.ts:18
Inherited from
status
readonlystatus:number=500
Defined in: core/src/errors/ZerotalError.ts:19
Inherited from
context?
readonlyoptionalcontext?:Record<string,unknown>
Defined in: core/src/errors/ZerotalError.ts:20