Skip to content

fix: Unwrap double-wrapped JSON-RPC errors#3432

Merged
FrederikBolding merged 2 commits intomainfrom
fb/unwrap-double-wrapped-errors
Jun 4, 2025
Merged

fix: Unwrap double-wrapped JSON-RPC errors#3432
FrederikBolding merged 2 commits intomainfrom
fb/unwrap-double-wrapped-errors

Conversation

@FrederikBolding
Copy link
Copy Markdown
Member

@FrederikBolding FrederikBolding commented May 30, 2025

A Snap may return a double-wrapped JSON-RPC error if it uses a JSON-RPC method that throws. In that case we currently do not unwrap it properly but instead return an error without a stack trace, this makes it unreadable in snaps-jest and is just generally not what we want to do. This PR unwraps this type of error to supply the stack trace.

@codecov
Copy link
Copy Markdown

codecov bot commented May 30, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.16%. Comparing base (323ac42) to head (b837428).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3432   +/-   ##
=======================================
  Coverage   98.16%   98.16%           
=======================================
  Files         402      402           
  Lines       11116    11123    +7     
  Branches     1755     1759    +4     
=======================================
+ Hits        10912    10919    +7     
  Misses        204      204           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@FrederikBolding FrederikBolding marked this pull request as ready for review June 4, 2025 12:10
@FrederikBolding FrederikBolding requested a review from a team as a code owner June 4, 2025 12:10
@FrederikBolding FrederikBolding added this pull request to the merge queue Jun 4, 2025
Merged via the queue into main with commit 7b08aba Jun 4, 2025
118 checks passed
@FrederikBolding FrederikBolding deleted the fb/unwrap-double-wrapped-errors branch June 4, 2025 12:26
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.

2 participants