| 1499 | } |
| 1500 | |
| 1501 | call<A>(effect: Effect.Effect<A, ChatError>): Effect.Effect<A, ConformanceFailure> { |
| 1502 | return Effect.mapError(effect, (error) => { |
| 1503 | const listed = error.reason._tag === "Unsupported" && this.has(error.reason.capability) |
| 1504 | return failure( |
| 1505 | this.rule, |
| 1506 | "success", |
| 1507 | describeError(error) + (listed ? " for a listed capability" : ""), |
| 1508 | error |
| 1509 | ) |
| 1510 | }) |
| 1511 | } |
| 1512 | |
| 1513 | collect<A>(stream: Stream.Stream<A, ChatError>): Effect.Effect<Array<A>, ConformanceFailure> { |
| 1514 | return this.call(Stream.runCollect(stream)) |