Skip to content

Comments

fix: should return err not nil#21264

Open
cuiweixie wants to merge 1 commit intosmartcontractkit:developfrom
cuiweixie:bugfix
Open

fix: should return err not nil#21264
cuiweixie wants to merge 1 commit intosmartcontractkit:developfrom
cuiweixie:bugfix

Conversation

@cuiweixie
Copy link

Requires

Supports

@cuiweixie cuiweixie requested a review from a team as a code owner February 21, 2026 13:53
Copilot AI review requested due to automatic review settings February 21, 2026 13:53
@cuiweixie cuiweixie requested a review from a team as a code owner February 21, 2026 13:53
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a critical bug in the OCR2GenericPluginConfig.UnmarshalJSON method where an error from json.Unmarshal was being suppressed by returning nil instead of the actual error. This would cause unmarshaling failures to be silently ignored, leading to potentially invalid configurations being accepted.

Changes:

  • Fixed error handling in UnmarshalJSON to properly return the error instead of nil

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

1 participant