fixes history loading slowly due to context switches
This commit is contained in:
@@ -15,6 +15,8 @@ pub enum HttpServerResultError {
|
||||
TlmUuidNotFound { uuid: String },
|
||||
#[error("DateTime Parsing Error: {date_time}")]
|
||||
InvalidDateTime { date_time: String },
|
||||
#[error("Timed out")]
|
||||
Timeout,
|
||||
}
|
||||
|
||||
impl ResponseError for HttpServerResultError {
|
||||
@@ -23,6 +25,7 @@ impl ResponseError for HttpServerResultError {
|
||||
HttpServerResultError::TlmNameNotFound { .. } => StatusCode::NOT_FOUND,
|
||||
HttpServerResultError::TlmUuidNotFound { .. } => StatusCode::NOT_FOUND,
|
||||
HttpServerResultError::InvalidDateTime { .. } => StatusCode::BAD_REQUEST,
|
||||
HttpServerResultError::Timeout { .. } => StatusCode::GATEWAY_TIMEOUT,
|
||||
}
|
||||
}
|
||||
fn error_response(&self) -> HttpResponse {
|
||||
|
||||
Reference in New Issue
Block a user