Effect CommunityEC
Effect Community8mo ago
13 replies
NotLuksus

Catch-all endpoint returns 204 No Content instead of expected response

My catch all Endpoint just returns 204 no content for some reason.
import { HttpApiEndpoint, HttpApiGroup } from "@effect/platform";

export class AuthGroup extends HttpApiGroup.make("auth")
    .add(HttpApiEndpoint.get("get", "/*"))
    .add(HttpApiEndpoint.post("post", "/*"))
    .prefix("/auth") {}


export const AuthRouter = HttpApiBuilder.group(
    Api,
    "auth",
    Effect.fnUntraced(function* (handlers) {
        return handlers
            .handle("get", () => Effect.succeed("OK"))
            .handle("post", () => Effect.succeed("OK"));
    }),
);


When I now go to the url I just get 204 and an empty body, I tried pretty much everything that comes to mind, and just put Effect.succeed to test as thats the most basic thing i could think of.

Any ideas?
Was this page helpful?