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

Function addError

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

Source from the content-addressed store, hash-verified

176 })
177 },
178 addError(
179 this: HttpApi.AnyWithProps,
180 schema: Schema.Schema.Any,
181 annotations?: { readonly status?: number }
182 ) {
183 return makeProto({
184 identifier: this.identifier,
185 groups: this.groups,
186 errorSchema: HttpApiSchema.UnionUnify(
187 this.errorSchema,
188 annotations?.status
189 ? schema.annotations(HttpApiSchema.annotations({ status: annotations.status }))
190 : schema
191 ),
192 annotations: this.annotations,
193 middlewares: this.middlewares
194 })
195 },
196 prefix(this: HttpApi.AnyWithProps, prefix: HttpApiEndpoint.PathSegment) {
197 return makeProto({
198 identifier: this.identifier,

Callers

nothing calls this directly

Calls 2

makeProtoFunction · 0.70
annotationsMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…