UNPKG

supertokens-node

Version:
25 lines (24 loc) 710 B
import STError from "../../error"; import RecipeModule from "../../recipeModule"; export default class SessionError extends STError { static UNAUTHORISED: "UNAUTHORISED"; static TRY_REFRESH_TOKEN: "TRY_REFRESH_TOKEN"; static TOKEN_THEFT_DETECTED: "TOKEN_THEFT_DETECTED"; constructor(options: { message: string; type: "UNAUTHORISED"; } | { message: string; type: "TRY_REFRESH_TOKEN"; } | { message: string; type: "TOKEN_THEFT_DETECTED"; payload: { userId: string; sessionHandle: string; }; } | { type: "GENERAL_ERROR"; payload: Error; }, recipe: RecipeModule | undefined); }