(message = 'Invalid or missing token')
| 51 | } |
| 52 | |
| 53 | export function unauthorized(message = 'Invalid or missing token'): ApiError { |
| 54 | return new ApiError(ApiErrorCode.UNAUTHORIZED, message) |
| 55 | } |
| 56 | |
| 57 | export function sessionNotFound(id: string): ApiError { |
| 58 | return new ApiError(ApiErrorCode.SESSION_NOT_FOUND, `Session not found: ${id}`) |