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:
parent
166f29fe17
commit
7edfeb0aa0
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue