Effect CommunityEC
Effect Community2y ago
6 replies
whatplan

Unexpected RPC Interruption Despite Successful JSON Response

rpc(new GetAll({ id: id })).pipe(
  Effect.onInterrupt(() => Effect.log('interrupted')),
  Effect.tap((res) => Effect.log('getall', res)),
  Effect.tapErrorCause((error) =>
    Effect.logError('getall', Cause.pretty(error)),
  ),
),


console:
timestamp=2024-07-26T22:01:59.153Z level=INFO fiber=#70 message=interrupted
fiberRuntime.js:1285 timestamp=2024-07-26T22:01:59.153Z level=ERROR fiber=#70 message=getall message="All fibers interrupted without errors."


but the /rpc network request returned the right json in the network tab??
[
    {
        "_tag": "Success",
        "value": [
            {
                "name": "example.com",
                "id": 39,
            }
        ]
    }
]


I am quite confused on how this is happening
I am running the effect with runPromise with no abort signal or anything so its coming from internally
Was this page helpful?