Skip to content

Conversation

@9aoy
Copy link
Contributor

@9aoy 9aoy commented Oct 30, 2025

Summary

The onTestCaseResult / onConsoleLog RPC timeout error should be captured because it will not affect the test. Use the logged error instead of the test's unhandled rejection error.

before:
img_v3_02ri_93664c40-a659-48a4-8f54-63f4521a5a8g

after:
img_v3_02ri_f273561f-ec04-4bab-8cbe-19c0215d9cag

Related Links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings October 30, 2025 09:44
@netlify
Copy link

netlify bot commented Oct 30, 2025

Deploy Preview for rstest-dev ready!

Name Link
🔨 Latest commit 0f43d2a
🔍 Latest deploy log https://app.netlify.com/projects/rstest-dev/deploys/690333874f61390008714364
😎 Deploy Preview https://deploy-preview-661--rstest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

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 adds timeout error handling for RPC method calls in the worker runtime. When RPC methods timeout, custom error messages are now logged to help with debugging.

  • Added onTimeoutError handler to the birpc configuration
  • Passes originalConsole to createRuntimeRpc to ensure error messages can be logged even when console is intercepted

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
packages/core/src/runtime/worker/rpc.ts Implements onTimeoutError handler with custom error messages for onTestCaseResult and onConsoleLog RPC methods, adds originalConsole parameter
packages/core/src/runtime/worker/index.ts Captures original console reference and passes it to createRuntimeRpc

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

@9aoy 9aoy requested a review from Timeless0911 October 30, 2025 09:56
@9aoy 9aoy merged commit 6f76bee into main Oct 30, 2025
23 checks passed
@9aoy 9aoy deleted the rpc-error branch October 30, 2025 10:47
@9aoy 9aoy mentioned this pull request Nov 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants