From 92b887e9b4b4b174f730ed1b760328cd77016d43 Mon Sep 17 00:00:00 2001 From: darian Date: Fri, 1 Nov 2024 16:57:20 +0200 Subject: [PATCH] move throw outside condition --- packages/backend/src/open_payments/auth/middleware.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/backend/src/open_payments/auth/middleware.ts b/packages/backend/src/open_payments/auth/middleware.ts index b5bccea5d0..7886f63502 100644 --- a/packages/backend/src/open_payments/auth/middleware.ts +++ b/packages/backend/src/open_payments/auth/middleware.ts @@ -153,8 +153,9 @@ export function createTokenIntrospectionMiddleware({ } catch (err) { if (err instanceof OpenPaymentsServerRouteError) { ctx.set('WWW-Authenticate', `GNAP as_uri=${config.authServerGrantUrl}`) - throw err } + + throw err } await next()