Skip to content

Commit c6e977e

Browse files
committed
hotfix because this should be 401 not 400
1 parent d76d9ba commit c6e977e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

rest.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ const messenger = function (err, req, res, next) {
143143
let token = req.header("Authorization")
144144
if(token && !token.startsWith("Bearer ")){
145145
error.message +=`
146-
Your token is not in the correct format. It should be a Bearer token formatted like: "Bearer <token>"`
146+
Your token is not in the correct format. It should be a Bearer token formatted like: "Bearer <token>"`
147+
error.status = 401
147148
}
148149
switch (error.status) {
149150
case 400:

0 commit comments

Comments
 (0)