Skip to content

fix: Replace direct error equality judgment with errors.Is to prevent panic#1198

Merged
HaiHui886 merged 1 commit into
mainfrom
sync_mr_2650_bf92946
Jun 25, 2026
Merged

fix: Replace direct error equality judgment with errors.Is to prevent panic#1198
HaiHui886 merged 1 commit into
mainfrom
sync_mr_2650_bf92946

Conversation

@csg-pr-bot

Copy link
Copy Markdown
Collaborator

Summary:

  • Replaced direct error equality checks (==) with errors.Is in component/llm_log_sync_ee.go and user/handler/user.go to safely traverse error chains.
  • Prevents potential panics and comparison failures that occur when custom errors are wrapped, ensuring robust error handling for "not found" and "forbidden" scenarios.

@csg-pr-bot

Copy link
Copy Markdown
Collaborator Author

Depends on #1197

@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 b6ca0cf into main Jun 25, 2026
7 checks passed
@HaiHui886 HaiHui886 deleted the sync_mr_2650_bf92946 branch June 25, 2026 00:03
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