()
| 382 | |
| 383 | private textEffect: Effect.Effect<string, Error.HttpServerError> | undefined |
| 384 | get text(): Effect.Effect<string, Error.HttpServerError> { |
| 385 | return this.textEffect ??= Effect.runSync(Effect.cached( |
| 386 | Effect.tryPromise({ |
| 387 | try: () => this.source.text(), |
| 388 | catch: (cause) => |
| 389 | new Error.HttpServerError({ |
| 390 | reason: new Error.RequestParseError({ request: this, cause }) |
| 391 | }) |
| 392 | }) |
| 393 | )) |
| 394 | } |
| 395 | get json(): Effect.Effect<Schema.Json, Error.HttpServerError> { |
| 396 | return Effect.flatMap(this.text, (_) => |
| 397 | Effect.try({ |
no outgoing calls