Skip to content

[Access] Remove panics from legacy handler#8519

Merged
zhangchiqing merged 1 commit into
masterfrom
leo/access-fix-panics
Apr 8, 2026
Merged

[Access] Remove panics from legacy handler#8519
zhangchiqing merged 1 commit into
masterfrom
leo/access-fix-panics

Conversation

@zhangchiqing
Copy link
Copy Markdown
Member

@zhangchiqing zhangchiqing commented Apr 7, 2026

https://github.com/onflow/flow-go-internal/pull/7175

Summary by CodeRabbit

  • Bug Fixes
    • Enhanced error handling to return proper error messages instead of crashes when accessing network parameters and account data.

@zhangchiqing zhangchiqing requested a review from a team as a code owner April 7, 2026 19:05
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 7, 2026

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Snapshot Warnings

⚠️: No snapshots were found for the head SHA 68a142f.
Ensure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice.

Scanned Files

None

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 7, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: cbeabad4-a1a8-48ff-8eae-26c72faa4a88

📥 Commits

Reviewing files that changed from the base of the PR and between 9596707 and 68a142f.

📒 Files selected for processing (1)
  • access/legacy/handler.go

📝 Walkthrough

Walkthrough

Two legacy handler methods that previously raised panics now return proper gRPC Unimplemented errors with standardized error codes and messages instead.

Changes

Cohort / File(s) Summary
Error Handling Improvements
access/legacy/handler.go
Replaced unconditional panic("implement me") calls in GetNetworkParameters and GetAccountAtBlockHeight methods with proper gRPC error returns using codes.Unimplemented.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A hop and a bound through error's gateway,
No more panics in the midnight fray!
With gRPC codes, so proper and clean,
The legacy handler's now serene. ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title '[Access] Remove panics from legacy handler' directly and clearly summarizes the main change: replacing panic calls with proper gRPC error returns in the legacy handler.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch leo/access-fix-panics

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 7, 2026

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
access/legacy/handler.go 0.00% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@zhangchiqing zhangchiqing added this pull request to the merge queue Apr 8, 2026
Merged via the queue into master with commit b91e229 Apr 8, 2026
61 checks passed
@zhangchiqing zhangchiqing deleted the leo/access-fix-panics branch April 8, 2026 15:36
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.

5 participants