* Creates an InvalidOutputError from a Schema error. * * **Example** (Creating an invalid output error from a schema error) * * ```ts import.meta.vitest * import { Effect, Schema } from "effect" * import { AiError } from "effect/ai" * * const schemaError = await Effect.runPro
(error: Schema.SchemaError)
| 940 | * @since 4.0.0 |
| 941 | */ |
| 942 | static fromSchemaError(error: Schema.SchemaError): InvalidOutputError { |
| 943 | return new InvalidOutputError({ description: error.message }) |
| 944 | } |
| 945 | |
| 946 | override get message(): string { |
| 947 | return `Invalid output: ${this.description}` |
no outgoing calls
no test coverage detected