Skip to content

fix(user/handler): add specific error handling for update user#1197

Merged
HaiHui886 merged 1 commit into
mainfrom
sync_mr_2645_ed430f0
Jun 24, 2026
Merged

fix(user/handler): add specific error handling for update user#1197
HaiHui886 merged 1 commit into
mainfrom
sync_mr_2645_ed430f0

Conversation

@csg-pr-bot

Copy link
Copy Markdown
Collaborator

Summary:

  • Added specific error handling in user/handler/user.go to return appropriate HTTP status codes (403 for ErrForbidden, 404 for ErrUserNotFound) instead of a generic 500 error.
  • Ensures the user update API provides accurate feedback for permission and existence issues while maintaining existing 500 handling for other errors.

@csg-pr-bot

Copy link
Copy Markdown
Collaborator Author

Depends on #1196

@HaiHui886 HaiHui886 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@HaiHui886 HaiHui886 merged commit 7c020ad into main Jun 24, 2026
7 checks passed
@HaiHui886 HaiHui886 deleted the sync_mr_2645_ed430f0 branch June 24, 2026 05:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants