Merge pull request #5862 from influxdata/dom/service-limit-http-code
refactor: return HTTP 400 for service limitspull/24376/head
commit
2a1089576b
|
@ -120,7 +120,7 @@ impl From<&DmlError> for StatusCode {
|
|||
}
|
||||
DmlError::Schema(SchemaError::ServiceLimit(_)) => {
|
||||
// https://docs.influxdata.com/influxdb/cloud/account-management/limits/#api-error-responses
|
||||
StatusCode::TOO_MANY_REQUESTS
|
||||
StatusCode::BAD_REQUEST
|
||||
}
|
||||
DmlError::Schema(SchemaError::Conflict(_)) => StatusCode::BAD_REQUEST,
|
||||
DmlError::Schema(SchemaError::UnexpectedCatalogError(_)) => {
|
||||
|
|
|
@ -339,5 +339,5 @@ async fn test_schema_limit() {
|
|||
);
|
||||
}
|
||||
);
|
||||
assert_eq!(err.as_status_code(), StatusCode::TOO_MANY_REQUESTS);
|
||||
assert_eq!(err.as_status_code(), StatusCode::BAD_REQUEST);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue