feat: implement TASK-WP1-02 login sessions
This commit is contained in:
@@ -19,6 +19,9 @@ export const stableEngineeringErrors = {
|
||||
IDEMPOTENCY_KEY_CONFLICT: { httpStatus: 409, messageKey: "request.idempotency_conflict" },
|
||||
AUTH_SESSION_INVALID: { httpStatus: 401, messageKey: "auth.session.invalid" },
|
||||
AUTH_SERVICE_UNAVAILABLE: { httpStatus: 503, messageKey: "auth.service.unavailable" },
|
||||
AUTH_ENTRY_REJECTED: { httpStatus: 409, messageKey: "auth.entry.rejected" },
|
||||
AUTH_RATE_LIMITED: { httpStatus: 429, messageKey: "auth.rate_limited" },
|
||||
AUTH_CSRF_INVALID: { httpStatus: 403, messageKey: "auth.csrf.invalid" },
|
||||
} as const;
|
||||
|
||||
export type StableEngineeringErrorCode = keyof typeof stableEngineeringErrors;
|
||||
@@ -55,6 +58,9 @@ export const StableEngineeringErrorCodeSchema = Type.Union(
|
||||
Type.Literal("IDEMPOTENCY_KEY_CONFLICT"),
|
||||
Type.Literal("AUTH_SESSION_INVALID"),
|
||||
Type.Literal("AUTH_SERVICE_UNAVAILABLE"),
|
||||
Type.Literal("AUTH_ENTRY_REJECTED"),
|
||||
Type.Literal("AUTH_RATE_LIMITED"),
|
||||
Type.Literal("AUTH_CSRF_INVALID"),
|
||||
],
|
||||
{ $id: "StableEngineeringErrorCode" },
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user