removed try catch from requireAuth middleware

This commit is contained in:
Sheen Capadngan
2023-05-29 18:14:16 +08:00
parent 7f4db518cc
commit e6027b3c72
-4
View File
@@ -45,7 +45,6 @@ const requireAuth = ({
// validate auth token against accepted auth modes [acceptedAuthModes] // validate auth token against accepted auth modes [acceptedAuthModes]
// and return token type [authTokenType] and value [authTokenValue] // and return token type [authTokenType] and value [authTokenValue]
try {
const { authMode, authTokenValue } = validateAuthMode({ const { authMode, authTokenValue } = validateAuthMode({
headers: req.headers, headers: req.headers,
acceptedAuthModes acceptedAuthModes
@@ -94,9 +93,6 @@ const requireAuth = ({
} }
return next(); return next();
} catch (err) {
return next(err);
}
} }
} }