From d23ed002b24ee29b1bfca98b7f5b3eb3ce47c2db Mon Sep 17 00:00:00 2001 From: Philipp Dormann Date: Sat, 5 Dec 2020 12:28:06 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A7=20JwtNotProvidedError?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ref #12 --- src/errors/AuthError.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/errors/AuthError.ts b/src/errors/AuthError.ts index a0de93a..cdaa870 100644 --- a/src/errors/AuthError.ts +++ b/src/errors/AuthError.ts @@ -76,4 +76,15 @@ export class UserNotFoundError extends NotFoundError { @IsString() message = "no user could be found for provided credential" +} + +/** + * Error to thow when no jwt token was provided + */ +export class JwtNotProvidedError extends NotAcceptableError { + @IsString() + name = "JwtNotProvidedError" + + @IsString() + message = "no jwt token was provided" } \ No newline at end of file