birpc icon indicating copy to clipboard operation
birpc copied to clipboard

fix: timeout error messages to include methods

Open AriPerkkio opened this issue 2 years ago • 0 comments

Description

Include arguments of rpc calls in timeout error messages. This helps when debugging cases like https://github.com/vitest-dev/vitest/discussions/4357.

Example of (intentional) error thrown in Vitest with this fix:

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Unhandled Errors ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯

Vitest caught 5 unhandled errors during the test run.
This might cause false positive tests. Resolve unhandled errors to make sure your tests are not affected.

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Unhandled Error ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Error: [birpc] timeout on calling "fetch" with arguments "/@vite/env,web"
 ❯ Timeout._onTimeout ../vitest/packages/vitest/dist/vendor-index.b7819908.js:38:22
 ❯ listOnTimeout node:internal/timers:569:17
 ❯ process.processTimers node:internal/timers:512:7

Linked Issues

Additional context

Before working on this I noticed that test files contained Typescript errors. I added typecheck step into the CI and fixed these errors.

AriPerkkio avatar Oct 24 '23 16:10 AriPerkkio