Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F33032125
D14775.1768403964.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1020 B
Referenced Files
None
Subscribers
None
D14775.1768403964.diff
View Options
diff --git a/native/native_rust_library/src/lib.rs b/native/native_rust_library/src/lib.rs
--- a/native/native_rust_library/src/lib.rs
+++ b/native/native_rust_library/src/lib.rs
@@ -556,7 +556,7 @@
SerdeJson(serde_json::Error),
#[display(fmt = "Missing response data")]
MissingResponseData,
- #[display(fmt = "{}", "_0")]
+ #[display(fmt = "{}", "_0.network_error_aware_display()")]
GRPClient(grpc_clients::error::Error),
#[display(fmt = "Generic error: {}", "_0")]
Generic(StringError),
diff --git a/shared/grpc_clients/src/error.rs b/shared/grpc_clients/src/error.rs
--- a/shared/grpc_clients/src/error.rs
+++ b/shared/grpc_clients/src/error.rs
@@ -14,6 +14,15 @@
InvalidDeviceType,
}
+impl Error {
+ pub fn network_error_aware_display(&self) -> String {
+ match self {
+ Self::TransportError(_) => "network_error".to_string(),
+ other_err => other_err.to_string(),
+ }
+ }
+}
+
pub fn unsupported_version() -> Status {
Status::unimplemented("unsupported_version")
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jan 14, 3:19 PM (5 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5929768
Default Alt Text
D14775.1768403964.diff (1020 B)
Attached To
Mode
D14775: [native] Handle Tonic gPRC network errors
Attached
Detach File
Event Timeline
Log In to Comment