Effect CommunityEC
Effect Community8mo ago
22 replies
Industrial

RPC response hanging

export const RpcWebHandler = RpcServer.toHttpApp(UserRpcs).pipe(
  Effect.map(HttpApp.toWebHandler),
  Effect.provide([AuthLive, UsersLive, RpcSerialization.layerNdjson]),
)


I'm trying to use this in a SolidStart API Route:

export const POST = async (event: APIEvent): Promise<Response> => {
  const handler = await Effect.runPromise(RpcWebHandler.pipe(Effect.scoped))
  const response = await handler(event.request)
  return response
}


When I make a HTTP request, there response never finishes. It's open forever. Did I do something wrong? The same example works with a standalone Effect.ts webserver.
Was this page helpful?