Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Add HandleException catch block to return correct error responses in SystemContracts #17703

Merged
merged 6 commits into from
Feb 10, 2025

Conversation

stoyanov-st
Copy link
Contributor

Description:
This PR adds a catch block to return the correct response for the fail-fast validations in the SystemContracts.
Update BDD tests to verify responses.

Related issue(s):

Fixes #17533
Fixes #17534

Notes for reviewer:

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

@stoyanov-st stoyanov-st added this to the v0.60 milestone Feb 4, 2025
@stoyanov-st stoyanov-st self-assigned this Feb 4, 2025
@stoyanov-st stoyanov-st requested review from a team and tinker-michaelj as code owners February 4, 2025 13:22
Copy link

codecov bot commented Feb 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.94%. Comparing base (0e06fca) to head (fa1ed57).
Report is 23 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main   #17703      +/-   ##
============================================
+ Coverage     68.91%   68.94%   +0.02%     
- Complexity    22999    23014      +15     
============================================
  Files          2647     2647              
  Lines         99516    99537      +21     
  Branches      10298    10302       +4     
============================================
+ Hits          68585    68625      +40     
+ Misses        27033    27022      -11     
+ Partials       3898     3890       -8     
Files with missing lines Coverage Δ
...contracts/common/AbstractNativeSystemContract.java 65.88% <100.00%> (+4.54%) ⬆️

... and 17 files with indirect coverage changes

Impacted file tree graph

Copy link

codacy-production bot commented Feb 4, 2025

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.02% (target: -1.00%) 100.00%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (0e06fca) 99299 72332 72.84%
Head commit (fa1ed57) 99320 (+21) 72364 (+32) 72.86% (+0.02%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#17703) 10 10 100.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

david-bakin-sl
david-bakin-sl previously approved these changes Feb 4, 2025
Copy link
Contributor

@david-bakin-sl david-bakin-sl left a comment

Choose a reason for hiding this comment

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

(If you agree with my comment about a separate API then create an issue for it?)

Signed-off-by: Stanimir Stoyanov <[email protected]>
Copy link
Contributor

@david-bakin-sl david-bakin-sl left a comment

Choose a reason for hiding this comment

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

LGTM though a big reservation about how complex the code in AbstractNativeSystemContract.computeFully has gotten over time. But I filed a separate issue to address that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants