Skip to content

Commit

Permalink
remove try catch
Browse files Browse the repository at this point in the history
  • Loading branch information
DarianM committed Nov 1, 2024
1 parent 92b887e commit fa0d4b1
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions packages/backend/src/open_payments/auth/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,14 +171,9 @@ export const authenticatedStatusMiddleware = async (
await next()
return
}
try {
await throwIfSignatureInvalid(ctx)
ctx.authenticated = true
} catch (err) {
if (!(err instanceof OpenPaymentsServerRouteError)) {
throw err
}
}

await throwIfSignatureInvalid(ctx)
ctx.authenticated = true
await next()
}

Expand Down

0 comments on commit fa0d4b1

Please sign in to comment.