BLOG-100 User retrieval functionality in authentication module #102
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "BLOG-100_get_current_logged_in_user"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
/me
, returns the whole user data.Package Changes
No response
Screenshots
No response
Reference
Resolves #100
Checklist
/improve
PR Code Suggestions ✨
Return specific HTTP error codes
The current error handling returns a generic 500 Internal Server Error for all
AuthError
variants. IfAuthError::UserNotFound
occurs, a 404 Not Found responsewould be more semantically appropriate for the client. Differentiate error responses
based on the specific
AuthError
variant.backend/feature/auth/src/framework/web/auth_web_routes.rs [110-116]
Suggestion importance[1-10]: 8
__
Why: The suggestion correctly identifies that returning a generic 500 for
AuthError::UserNotFound
is not ideal. Providing a specific 404 response forAuthError::UserNotFound
improves the API's semantic correctness and client-side error handling.Since
NotFound
error isn't expected in this situation, returnsInternalError
.