effect icon indicating copy to clipboard operation
effect copied to clipboard

From Discord: RuntimeException: @effect/rpc: handler must return an array of responses with the same length as the

Open effect-bot opened this issue 8 months ago • 0 comments

Summary

Summary:

Pietro encountered a RuntimeException with the error message "@effect/rpc: handler must return an array of responses with the same length as the" after upgrading the effect-ts packages. The error disappeared when either the CreateContest or GetContest was removed from the code. Pietro shared parts of the code, including TestLiveServer.ts, Schema.ts, and e2e.test.ts. Tim asked about the serve effect, which Pietro then provided. Pietro later identified that the issue was due to the output failing validation, and mentioned that the error was swallowed by the runtime when using the NoStream version of the RPC client and resolver, suggesting it might be a bug. Tim requested a small reproduction for further investigation.

Key Takeaways:

  1. Error Context: The error occurred after upgrading effect-ts packages and involved RPC handlers.
  2. Code Components: Key components include EnvLive, client, GetContest, and serve.
  3. Issue Identification: The problem was related to output validation failure.
  4. Potential Bug: The error was not properly surfaced when using the NoStream version of the RPC client and resolver.
  5. Next Steps: Tim requested a small reproducible example for further investigation.

Discord thread

https://discord.com/channels/795981131316985866/1254479582430494845

effect-bot avatar Jun 24 '24 10:06 effect-bot