We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f17f2dd commit 600f505Copy full SHA for 600f505
src/controllers/util.rs
@@ -42,11 +42,12 @@ impl<'a> UserAuthenticationExt for dyn Request + 'a {
42
user_id: token.user_id,
43
token_id: Some(token.id),
44
})
45
- // Convert a NotFound (or other database error) into Unauthorized
46
- .map_err(|_| Box::new(Unauthorized) as Box<dyn AppError>)
+ .chain_error(|| internal("invalid token"))
+ .chain_error(|| Box::new(Unauthorized) as Box<dyn AppError>)
47
} else {
48
// Unable to authenticate the user
49
- Err(Box::new(Unauthorized))
+ Err(internal("no cookie session or auth header found"))
50
51
}
52
53
0 commit comments