Skip to content

fix: update getBetterError tests for mutation-based implementation#2943

Merged
brillout merged 8 commits intobrillout/devfrom
copilot/sub-pr-2942
Dec 14, 2025
Merged

fix: update getBetterError tests for mutation-based implementation#2943
brillout merged 8 commits intobrillout/devfrom
copilot/sub-pr-2942

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Dec 14, 2025

  • Analyze failing tests
  • Identify root cause: structuredClone doesn't preserve getOriginalError method
  • Fix implementation: preserve getOriginalError before cloning
  • Run tests - all passing (33/33)
  • Code review - addressed type safety issue
  • Improve type assertion from any to specific type
  • Security check - no vulnerabilities found
  • Reply to user comment

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: brillout <1005638+brillout@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix issue with breaking ssrFixStacktrace fix: update getBetterError tests for mutation-based implementation Dec 14, 2025
Copilot AI requested a review from brillout December 14, 2025 18:29
@brillout
Copy link
Copy Markdown
Member

@copilot still failing

Copilot AI and others added 2 commits December 14, 2025 18:42
Co-authored-by: brillout <1005638+brillout@users.noreply.github.com>
Co-authored-by: brillout <1005638+brillout@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Dec 14, 2025

@copilot still failing

Fixed in commits bd8d409 and ea88c1e. The issue was that structuredClone doesn't preserve methods on Error objects, so the getOriginalError chaining wasn't working. Now we preserve the method before cloning. All 33 tests passing.

@brillout brillout marked this pull request as ready for review December 14, 2025 19:28
@brillout brillout merged commit b2e6abb into brillout/dev Dec 14, 2025
21 checks passed
@brillout brillout deleted the copilot/sub-pr-2942 branch December 14, 2025 19:29
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