Skip to content

Commit

Permalink
error: Add NodeApiError::proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxFangX committed Feb 2, 2024
1 parent cc36a49 commit 4a60d63
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions common/src/api/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,12 @@ impl NodeApiError {
let kind = NodeErrorKind::WrongNodePk;
Self { kind, msg }
}

pub fn proxy(error: impl fmt::Display) -> Self {
let msg = format!("{error:#}");
let kind = NodeErrorKind::Proxy;
Self { kind, msg }
}
}

impl GatewayApiError {
Expand Down

0 comments on commit 4a60d63

Please sign in to comment.