Skip to content

Commit

Permalink
chore: log scheme used
Browse files Browse the repository at this point in the history
  • Loading branch information
gregberge committed Sep 25, 2024
1 parent d91be2a commit b3606bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/backend/src/auth/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export class AuthError extends Error {}
const getTokenFromAuthHeader = (authHeader: string) => {
const auth = authorization.parse(authHeader);
if (auth.scheme !== "Bearer") {
throw new AuthError("Invalid auth scheme");
throw new AuthError(`Invalid auth scheme: ${auth.scheme || "no scheme"}`);
}
if (typeof auth.token !== "string" || !auth.token) {
throw new AuthError("Invalid auth token");
Expand Down

0 comments on commit b3606bf

Please sign in to comment.