(status: number)
| 33 | const clientError = (reason: RpcClientError.RpcClientError["reason"]) => new RpcClientError.RpcClientError({ reason }) |
| 34 | const request = HttpClientRequest.get("http://todos.internal:8080/rpc") |
| 35 | const statusCodeError = (status: number) => |
| 36 | clientError(HttpClientError.HttpClientErrorSchema.fromHttpClientError( |
| 37 | new HttpClientError.HttpClientError({ |
| 38 | reason: new HttpClientError.StatusCodeError({ |
| 39 | request, |
| 40 | response: HttpClientResponse.fromWeb(request, new Response("upstream stack: s3cret", { status })) |
| 41 | }) |
| 42 | }) |
| 43 | )) |
| 44 | const failures: Record<number, RpcClientError.RpcClientError> = { |
| 45 | 3: statusCodeError(502), |
| 46 | 4: clientError(new Socket.SocketCloseError({ code: 1011, closeReason: "s3cret" })), |
no test coverage detected