Skip to content

Commit

Permalink
[fix]: exhaustive error match
Browse files Browse the repository at this point in the history
Signed-off-by: Dmitry Balashov <a.marcius26@gmail.com>
  • Loading branch information
0x009922 committed Oct 23, 2023
1 parent cf10cef commit 2ff6a75
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cli/src/torii/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,14 @@ impl Error {
match self {
Query(e) => Self::query_status_code(e),
AcceptTransaction(_) | ConfigurationReload(_) => StatusCode::BAD_REQUEST,
Config(_) => StatusCode::NOT_FOUND,
Config(_) | StatusSegmentNotFound(_) => StatusCode::NOT_FOUND,
PushIntoQueue(err) => match **err {
queue::Error::Full => StatusCode::INTERNAL_SERVER_ERROR,
queue::Error::SignatureCondition { .. } => StatusCode::UNAUTHORIZED,
_ => StatusCode::BAD_REQUEST,
},
#[cfg(feature = "telemetry")]
Prometheus(_) => StatusCode::INTERNAL_SERVER_ERROR,
Prometheus(_) | StatusFailure(_) => StatusCode::INTERNAL_SERVER_ERROR,
}
}

Expand Down

0 comments on commit 2ff6a75

Please sign in to comment.