0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-03-10 22:22:45 -05:00

refactor(console): refactor error handling in Express tutorial (#5403)

This commit is contained in:
ジョージー 2024-02-26 08:27:35 +01:00 committed by GitHub
parent 166f29fe17
commit 7edfeb0aa0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -141,7 +141,7 @@ const extractBearerTokenFromHeaders = ({ authorization }: IncomingHttpHeaders) =
}
if (!authorization.startsWith('Bearer')) {
throw an Error('Authorization header is not in the Bearer scheme');
throw new Error('Authorization header is not in the Bearer scheme');
}
return authorization.slice(7); // The length of 'Bearer ' is 7