chore: fix lints
parent
81802abb8e
commit
30d5857fd4
|
@ -205,19 +205,19 @@ impl ApplicationError {
|
|||
use influxdb_iox_client::errors::ApiErrorCode;
|
||||
|
||||
match self {
|
||||
ApplicationError::DatabaseNameError { .. } => ApiErrorCode::DB_INVALID_NAME,
|
||||
ApplicationError::DatabaseNotFound { .. } => ApiErrorCode::DB_NOT_FOUND,
|
||||
Self::DatabaseNameError { .. } => ApiErrorCode::DB_INVALID_NAME,
|
||||
Self::DatabaseNotFound { .. } => ApiErrorCode::DB_NOT_FOUND,
|
||||
|
||||
// Some errors are wrapped
|
||||
ApplicationError::ErrorCreatingDatabase {
|
||||
Self::ErrorCreatingDatabase {
|
||||
source: server::Error::InvalidDatabaseName { .. },
|
||||
} => ApiErrorCode::DB_INVALID_NAME,
|
||||
|
||||
ApplicationError::ErrorCreatingDatabase {
|
||||
Self::ErrorCreatingDatabase {
|
||||
source: server::Error::DatabaseNotFound { .. },
|
||||
} => ApiErrorCode::DB_NOT_FOUND,
|
||||
|
||||
ApplicationError::ErrorCreatingDatabase {
|
||||
Self::ErrorCreatingDatabase {
|
||||
source: server::Error::DatabaseAlreadyExists { .. },
|
||||
} => ApiErrorCode::DB_ALREADY_EXISTS,
|
||||
|
||||
|
|
|
@ -444,7 +444,7 @@ async fn test_http_error_messages(client: &influxdb2_client::Client) -> Result<(
|
|||
.await
|
||||
.expect_err("Should have errored");
|
||||
|
||||
let expected_error = "HTTP request returned an error: 400 Bad Request, `{\"error\":\"Error parsing line protocol: A generic parsing error occurred: TakeWhile1\"}`";
|
||||
let expected_error = "HTTP request returned an error: 400 Bad Request, `{\"error\":\"Error parsing line protocol: A generic parsing error occurred: TakeWhile1\",\"error_code\":100}`";
|
||||
assert_eq!(result.to_string(), expected_error);
|
||||
|
||||
Ok(())
|
||||
|
|
Loading…
Reference in New Issue