From 0184688ebfe82456e6012d62969d3b36bd59bc6a Mon Sep 17 00:00:00 2001 From: Samuel Kopp <62482066+boywithkeyboard@users.noreply.github.com> Date: Fri, 1 Sep 2023 00:25:48 +0200 Subject: [PATCH] fix(context/exception): return exception (#211) --- context.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/context.ts b/context.ts index c834f10..1c4fed0 100644 --- a/context.ts +++ b/context.ts @@ -151,7 +151,7 @@ export class Context< exception(error: keyof typeof HTTP_MESSAGES, description?: string) { const code = HTTP_MESSAGES[error] - throw new Exception(error, description, code) + return new Exception(error, description, code) } }