(result: any)
| 335 | ) |
| 336 | |
| 337 | const encodeResult = (result: any) => |
| 338 | schemas.encodeResult(result).pipe( |
| 339 | Effect.mapError((cause) => |
| 340 | AiError.make({ |
| 341 | module: "Toolkit", |
| 342 | method: `${name}.handle`, |
| 343 | reason: new AiError.ToolResultEncodingError({ |
| 344 | toolName: name, |
| 345 | toolResult: result, |
| 346 | description: cause.message |
| 347 | }) |
| 348 | }) |
| 349 | ) |
| 350 | ) |
| 351 | |
| 352 | const normalizeError = (error: unknown) => { |
| 353 | // Schema errors indicate handler returned invalid data |
no test coverage detected