(self)
| 376 | |
| 377 | impl<S> PrpcHandler<'_, '_, S> { |
| 378 | pub async fn handle<Call: RpcCall<S>>(self) -> RpcResponse { |
| 379 | let json = self.request.json; |
| 380 | let result = handle_prpc_impl::<S, Call>(self).await; |
| 381 | match result { |
| 382 | Ok(output) => output, |
| 383 | Err(err) => { |
| 384 | warn!("error handling prpc: {err:?}"); |
| 385 | let body = encode_error(json, &err); |
| 386 | RpcResponse { |
| 387 | is_json: json, |
| 388 | status: Status::BadRequest, |
| 389 | body, |
| 390 | } |
| 391 | } |
| 392 | } |
| 393 | } |
| 394 | } |
| 395 | |
| 396 | impl From<Endpoint> for RemoteEndpoint { |
nothing calls this directly
no test coverage detected