Skip to content

Commit

Permalink
fix error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
iainsproat committed Feb 5, 2025
1 parent db2ab20 commit 3715725
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/server/modules/shared/middleware/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ export async function authContextMiddleware(
if (!authContext.auth && authContext.err) {
const defaultMessage = 'Unknown Auth context error'

switch (authContext.constructor) {
switch (authContext.err.constructor) {
case UnauthorizedError:
return res
.status(401)
Expand Down

0 comments on commit 3715725

Please sign in to comment.