mirror of
https://github.com/hexedtech/codemp.git
synced 2024-11-22 15:24:48 +01:00
fix: more verbose error strings
This commit is contained in:
parent
981e7218b5
commit
314b163b05
1 changed files with 3 additions and 3 deletions
|
@ -6,7 +6,7 @@
|
||||||
/// This currently wraps an [http code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status),
|
/// This currently wraps an [http code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status),
|
||||||
/// returned as procedure status.
|
/// returned as procedure status.
|
||||||
#[derive(Debug, thiserror::Error)]
|
#[derive(Debug, thiserror::Error)]
|
||||||
#[error("server rejected procedure with error code: {0}")]
|
#[error("server rejected procedure with error code: {0:?}")]
|
||||||
pub struct RemoteError(#[from] tonic::Status);
|
pub struct RemoteError(#[from] tonic::Status);
|
||||||
|
|
||||||
/// Wraps [std::result::Result] with a [RemoteError].
|
/// Wraps [std::result::Result] with a [RemoteError].
|
||||||
|
@ -16,11 +16,11 @@ pub type RemoteResult<T> = std::result::Result<T, RemoteError>;
|
||||||
#[derive(Debug, thiserror::Error)]
|
#[derive(Debug, thiserror::Error)]
|
||||||
pub enum ConnectionError {
|
pub enum ConnectionError {
|
||||||
/// Underlying [`tonic::transport::Error`].
|
/// Underlying [`tonic::transport::Error`].
|
||||||
#[error("transport error: {0}")]
|
#[error("transport error: {0:?}")]
|
||||||
Transport(#[from] tonic::transport::Error),
|
Transport(#[from] tonic::transport::Error),
|
||||||
|
|
||||||
/// Error from the remote server, see [`RemoteError`].
|
/// Error from the remote server, see [`RemoteError`].
|
||||||
#[error("server rejected connection attempt: {0}")]
|
#[error("server rejected connection attempt: {0:?}")]
|
||||||
Remote(#[from] RemoteError),
|
Remote(#[from] RemoteError),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue