Interrupt error when executing rpc call with runPromise

Is is possible to provide a Layer to a Router?

I have the following:
import { HttpApp } from "@effect/platform";
import { Router, Rpc } from "@effect/rpc";
import { HttpRouterNoStream } from "@effect/rpc-http";
import { Effect } from "effect";
import { SignInRequest } from "./schema";

const router = Router.make(
  Rpc.effect(SignInRequest, (params) =>
    Effect.gen(function* () {
      ///
    })
  )
);

export type Router = typeof router;

export const RpcServer = HttpApp.toWebHandler(
  HttpRouterNoStream.toHttpApp(router)
);


The effect inside Rpc.effect requires some services. I would like to provide a full layer to the router so that RpcServer can be executed directly
Was this page helpful?