Skip to content

Commit b5da547

Browse files
committed
refactor: [torrust#445] new return error type for user id extractor
1 parent adec821 commit b5da547

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/web/api/server/v1/extractors/user_id.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ where
3131

3232
match app_data.auth.get_user_id_from_bearer_token(&maybe_bearer_token).await {
3333
Ok(user_id) => Ok(ExtractLoggedInUser(user_id)),
34-
Err(error) => Err(error.into_response()),
34+
Err(_) => Err(ServiceError::Unauthorized.into_response()),
3535
}
3636
}
3737
}

0 commit comments

Comments
 (0)