class SessionMiddlewareMissingError
extends Error
Since 0.2.0

Thrown by getSession(ctx) / SessionService.from(ctx) when the session middleware did not run for the request.

The usual cause is resolving the session inside a middleware registered at a priority lower than the session middleware's 260, so it runs before the session is loaded.

Constructors

SessionMiddlewareMissingError()

Properties

readonly
name: string

Discriminant for consumers that cannot use instanceof across realms.

Usage

import { SessionMiddlewareMissingError } from "session-plugin/src/index.ts";