Skip to content

layerHttpOptions should use layerProtocolHttpRouter #5918

@sdemjanenko

Description

@sdemjanenko

What version of Effect is running?

@effect/cluster: 0.55.0

What steps can reproduce the bug?

I noticed that the implementation of layerHttpOptions is:

RunnerServer.layerWithClients.pipe(
  Layer.provide(RpcServer.layerProtocolHttp(options))
)

leads to logs that look like:

[03:39:12.604] INFO (#3675) http.span.11=0ms:
      RouteNotFound: POST / not found
          at http.server POST
      http.status: 404
      http.method: POST
      http.url: /

I believe layerHttpOptions needs to be adjusted to

RunnerServer.layerWithClients.pipe(
  Layer.provide(RpcServer.layerProtocolHttpRouter(options))
)

Note: layerProtocolHttpRouter instead of layerProtocolHttp

What is the expected behavior?

No response

What do you see instead?

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions