Spaces:
Paused
Paused
Download apps/prevision-api/src/common/exceptions/app.exception.ts from modventures/prevision: direct link, hf CLI and curl.
- Browser
- Download file 393 Bytes
-
https://huggingface.co/spaces/modventures/prevision/resolve/main/apps/prevision-api/src/common/exceptions/app.exception.ts
- Command line
-
hf download hf://spaces/modventures/prevision/apps/prevision-api/src/common/exceptions/app.exception.ts
-
curl -L -o app.exception.ts https://huggingface.co/spaces/modventures/prevision/resolve/main/apps/prevision-api/src/common/exceptions/app.exception.ts
393 Bytes
| import { HttpException } from '@nestjs/common'; | |
| /** An error with a stable code the frontend can act on. */ | |
| export class AppException extends HttpException { | |
| constructor( | |
| status: number, | |
| readonly code: string, | |
| message: string, | |
| ) { | |
| super(message, status); | |
| } | |
| } | |
| export const unauthenticated = () => new AppException(401, 'UNAUTHENTICATED', 'Please sign in to continue.'); | |