* Creates a MalformedOutput error from a Schema ParseError. * * @example * ```ts * import { AiError } from "@effect/ai" * import { Effect, Schema } from "effect" * * const UserSchema = Schema.Struct({ * name: Schema.String, * age: Schema.Number * }) * * const
({ error, ...params }: {
readonly module: string
readonly method: string
readonly description?: string
readonly error: ParseError
})
| 588 | * @category Constructors |
| 589 | */ |
| 590 | static fromParseError({ error, ...params }: { |
| 591 | readonly module: string |
| 592 | readonly method: string |
| 593 | readonly description?: string |
| 594 | readonly error: ParseError |
| 595 | }): MalformedOutput { |
| 596 | // TODO(Max): enhance |
| 597 | return new MalformedOutput({ |
| 598 | ...params, |
| 599 | cause: error |
| 600 | }) |
| 601 | } |
| 602 | } |
| 603 | |
| 604 | // ============================================================================= |
no outgoing calls
no test coverage detected