MCPcopy Create free account
hub / github.com/Dstack-TEE/dstack / handle

Method handle

ra-rpc/src/rocket_helper.rs:378–393  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

376
377impl<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
396impl From<Endpoint> for RemoteEndpoint {

Callers

nothing calls this directly

Calls 1

encode_errorFunction · 0.85

Tested by

no test coverage detected