MCPcopy Index your code
hub / github.com/Effect-TS/effect / addError

Function addError

packages/platform/src/HttpApiEndpoint.ts:770–778  ·  view source on GitHub ↗
(this: HttpApiEndpoint.AnyWithProps, schema: Schema.Schema.Any, annotations?: { readonly status?: number })

Source from the content-addressed store, hash-verified

768 })
769 },
770 addError(this: HttpApiEndpoint.AnyWithProps, schema: Schema.Schema.Any, annotations?: { readonly status?: number }) {
771 return makeProto({
772 ...this,
773 errorSchema: HttpApiSchema.UnionUnify(
774 this.errorSchema,
775 annotations?.status ? schema.annotations(HttpApiSchema.annotations({ status: annotations.status })) : schema
776 )
777 })
778 },
779 setPayload(this: HttpApiEndpoint.AnyWithProps, schema: Schema.Schema.Any) {
780 return makeProto({
781 ...this,

Callers

nothing calls this directly

Calls 2

makeProtoFunction · 0.70
annotationsMethod · 0.65

Tested by

no test coverage detected