Home
last modified time | relevance | path

Searched refs:err (Results 1 – 17 of 17) sorted by relevance

/tonic/tonic/src/
H A Dstatus.rs319 Status::try_from_error(err).unwrap_or_else(|err| { in from_error()
336 let err = match err.downcast::<Status>() { in try_from_error() localVariable
340 Err(err) => err, in try_from_error()
344 let err = match err.downcast::<h2::Error>() { in try_from_error() localVariable
348 Err(err) => err, in try_from_error()
356 Err(err) in try_from_error()
372 match err.reason() { in code_from_h2()
413 if err.is_timeout() { in from_hyper_error()
436 let err: Box<dyn Error + Send + Sync> = err.into(); in map_error() localVariable
727 self.source.as_ref().map(|err| (&**err) as _) in source()
[all …]
/tonic/tests/integration_tests/tests/
H A Dtimeout.rs21 let err = res.unwrap_err(); in cancelation_on_timeout() localVariable
22 assert!(err.message().contains("Timeout expired")); in cancelation_on_timeout()
23 assert_eq!(err.code(), Code::Cancelled); in cancelation_on_timeout()
40 let err = res.unwrap_err(); in picks_server_timeout_if_thats_sorter() localVariable
41 assert!(err.message().contains("Timeout expired")); in picks_server_timeout_if_thats_sorter()
42 assert_eq!(err.code(), Code::Cancelled); in picks_server_timeout_if_thats_sorter()
59 let err = res.unwrap_err(); in picks_client_timeout_if_thats_sorter() localVariable
60 assert!(err.message().contains("Timeout expired")); in picks_client_timeout_if_thats_sorter()
61 assert_eq!(err.code(), Code::Cancelled); in picks_client_timeout_if_thats_sorter()
H A Dstatus.rs55 let err = channel in status_with_details() localVariable
60 assert_eq!(err.message(), "Too many requests"); in status_with_details()
61 assert_eq!(err.details(), &[1]); in status_with_details()
113 let err = channel in status_with_metadata() localVariable
118 assert_eq!(err.code(), Code::Internal); in status_with_metadata()
119 assert_eq!(err.message(), MESSAGE); in status_with_metadata()
121 let metadata = err.metadata(); in status_with_metadata()
H A Dconnection.rs66 let err = res.unwrap_err(); in connect_returns_err_via_call_after_connected() localVariable
67 assert_eq!(err.code(), Code::Unavailable); in connect_returns_err_via_call_after_connected()
110 let err = client.unary_call(Request::new(Input {})).await.unwrap_err(); in connect_lazy_reconnects_after_first_failure() localVariable
112 assert_eq!(err.code(), Code::Unavailable); in connect_lazy_reconnects_after_first_failure()
H A Dhttp2_max_header_list_size.rs63 let err = client.unary_call(Request::new(Input {})).await.unwrap_err(); in test_http_max_header_list_size_and_long_errors() localVariable
65 assert_eq!(err.message(), long_message()); in test_http_max_header_list_size_and_long_errors()
/tonic/examples/src/streaming/
H A Dserver.rs16 let mut err: &(dyn Error + 'static) = err_status; in match_for_io_error() localVariable
19 if let Some(io_err) = err.downcast_ref::<std::io::Error>() { in match_for_io_error()
25 if let Some(h2_err) = err.downcast_ref::<h2::Error>() { in match_for_io_error()
31 err = err.source()?; in match_for_io_error()
112 Err(err) => { in bidirectional_streaming_echo()
113 if let Some(io_err) = match_for_io_error(&err) { in bidirectional_streaming_echo()
122 match tx.send(Err(err)).await { in bidirectional_streaming_echo()
/tonic/tonic/src/service/
H A Drecover_error.rs98 Err(err) => match Status::try_from_error(err.into()) { in poll()
104 Err(err) => Poll::Ready(Err(err)), in poll()
H A Drouter.rs179 Err(err) => match err {}, in poll()
/tonic/tonic/src/codec/
H A Dencode.rs157 .map_err(|err| Status::internal(format!("Error encoding: {}", err)))?; in encode_item()
170 .map_err(|err| Status::internal(format!("Error compressing: {}", err)))?; in encode_item()
174 .map_err(|err| Status::internal(format!("Error encoding: {}", err)))?; in encode_item()
H A Ddecode.rs132 .map_err(|err| Status::map_error(err.into())), in new()
216 if let Err(err) = decompress( in decode_chunk()
228 err, status in decode_chunk()
231 format!("Error decompressing: {}, while sending request", err) in decode_chunk()
409 Err(err) => Some(Err(err)), in poll_next()
/tonic/tonic/src/transport/channel/service/
H A Dadd_origin.rs45 let err = crate::transport::Error::new_invalid_uri(); in call() localVariable
46 return Box::pin(async move { Err::<Self::Response, _>(err.into()) }); in call()
H A Dconnector.rs47 .map_err(|err| ConnectError(From::from(err))) in poll_ready()
/tonic/tests/web/tests/
H A Dgrpc_web.rs133 Full::new(bytes).map_err(|err| Status::internal(err.to_string())), in build_request()
/tonic/tonic-types/src/richer_error/
H A Dmod.rs1040 Err(err) => panic!( in gen_status_with_details()
1042 err in gen_status_with_details()
1055 Err(err) => panic!( in gen_status_with_details()
1057 err in gen_status_with_details()
/tonic/tonic-health/src/
H A Dserver.rs242 assert_grpc_status(resp.err(), Code::NotFound); in test_service_check()
294 assert_grpc_status(resp.err(), Code::NotFound); in test_service_watch()
/tonic/tonic/src/transport/server/
H A Dmod.rs797 if let Err(err) = rv { in serve_connection()
798 debug!("failed serving connection: {:#}", err); in serve_connection()
/tonic/tonic/src/metadata/
H A Dmap.rs967 Err(err) => Err(err), in generic_entry()