cleanup
This commit is contained in:
@@ -23,6 +23,8 @@ pub enum HttpServerResultError {
|
||||
PanelUuidNotFound { uuid: Uuid },
|
||||
#[error(transparent)]
|
||||
Command(#[from] crate::command::error::Error),
|
||||
#[error("Command Not Found: {cmd}")]
|
||||
CmdNotFound { cmd: String },
|
||||
}
|
||||
|
||||
impl ResponseError for HttpServerResultError {
|
||||
@@ -36,6 +38,7 @@ impl ResponseError for HttpServerResultError {
|
||||
HttpServerResultError::InternalError { .. } => StatusCode::INTERNAL_SERVER_ERROR,
|
||||
HttpServerResultError::PanelUuidNotFound { .. } => StatusCode::NOT_FOUND,
|
||||
HttpServerResultError::Command(inner) => inner.status_code(),
|
||||
HttpServerResultError::CmdNotFound { .. } => StatusCode::NOT_FOUND,
|
||||
}
|
||||
}
|
||||
fn error_response(&self) -> HttpResponse {
|
||||
|
||||
Reference in New Issue
Block a user