fix: add fallback to reverselookup error (#3025)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Kartikeya Hegde
2023-12-05 12:47:37 +05:30
committed by GitHub
parent 298e3627c3
commit ba392f58b2
14 changed files with 288 additions and 227 deletions

View File

@ -251,14 +251,6 @@ pub(crate) fn diesel_error_to_data_error(
entity: "entity ",
key: None,
},
diesel_models::errors::DatabaseError::NoFieldsToUpdate => {
StorageError::DatabaseError("No fields to update".to_string())
}
diesel_models::errors::DatabaseError::QueryGenerationFailed => {
StorageError::DatabaseError("Query generation failed".to_string())
}
diesel_models::errors::DatabaseError::Others => {
StorageError::DatabaseError("Others".to_string())
}
_ => StorageError::DatabaseError(error_stack::report!(*diesel_error)),
}
}