Skip to content

Commit f623cc8

Browse files
refactor: remove ServiceUnavailable error from PostError enum
1 parent 1cee98f commit f623cc8

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/handlers/http/ingest.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ use super::logstream::error::{CreateStreamError, StreamError};
4444
use super::modal::utils::ingest_utils::{flatten_and_push_logs, get_custom_fields_from_header};
4545
use super::users::dashboards::DashboardError;
4646
use super::users::filters::FiltersError;
47+
4748
// Handler for POST /api/v1/ingest
4849
// ingests events by extracting stream name from header
4950
// creates if stream does not exist
@@ -488,8 +489,6 @@ pub enum PostError {
488489
IncorrectLogFormat(String),
489490
#[error("Failed to ingest events in dataset {0}. Total number of fields {1} exceeds the permissible limit of {2}. We recommend creating a new dataset beyond {2} for better query performance.")]
490491
FieldsCountLimitExceeded(String, usize, usize),
491-
#[error("Service Unavailable: Server over-utilized")]
492-
ServiceUnavailable(String),
493492
}
494493

495494
impl actix_web::ResponseError for PostError {
@@ -519,7 +518,6 @@ impl actix_web::ResponseError for PostError {
519518
PostError::KnownFormat(_) => StatusCode::BAD_REQUEST,
520519
PostError::IncorrectLogFormat(_) => StatusCode::BAD_REQUEST,
521520
PostError::FieldsCountLimitExceeded(_, _, _) => StatusCode::BAD_REQUEST,
522-
PostError::ServiceUnavailable(_) => StatusCode::SERVICE_UNAVAILABLE
523521
}
524522
}
525523

0 commit comments

Comments
 (0)