MCPcopy Create free account
hub / github.com/Effect-TS/effect / CustomError

Class CustomError

packages/platform/deno/test/DenoHttpServer.test.ts:515–522  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

513 it.effect("error/schema", () =>
514 Effect.gen(function*() {
515 class CustomError extends Schema.Error<CustomError>("CustomError")({
516 _tag: Schema.tag("CustomError"),
517 name: Schema.String
518 }) {
519 [HttpServerRespondable.symbol]() {
520 return HttpServerResponse.schemaJson(CustomError)(this, { status: 599 })
521 }
522 }
523 yield* HttpRouter.add("GET", "/home", new CustomError({ name: "test" })).pipe(
524 HttpRouter.serve,
525 Layer.build

Callers

nothing calls this directly

Calls 1

tagMethod · 0.65

Tested by

no test coverage detected