Skip to content

Commit

Permalink
refactor error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Chethan-rao committed Oct 10, 2024
1 parent 740989e commit 98d6b20
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/error/custom_error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ pub enum MerchantDBError {
DEKDecryptionError,
#[error("Error while connecting to database")]
DBError,
#[error("Error while finding element in the database")]
#[error("Error while finding merchant record in the database")]
DBFilterError,
#[error("Error while inserting element in the database")]
#[error("Error while inserting merchant record in the database")]
DBInsertError,
#[error("Element not found in database")]
#[error("Merchant record not found in database")]
NotFoundError,
#[error("Unpredictable error occurred")]
UnknownError,
Expand All @@ -24,13 +24,13 @@ pub enum VaultDBError {
DataDecryptionError,
#[error("Error while connecting to database")]
DBError,
#[error("Error while finding element in the database")]
#[error("Error while finding vault record in the database")]
DBFilterError,
#[error("Error while inserting element in the database")]
#[error("Error while inserting vault record in the database")]
DBInsertError,
#[error("Error while deleting element in the database")]
#[error("Error while deleting vault record in the database")]
DBDeleteError,
#[error("Element not found in database")]
#[error("Vault record not found in database")]
NotFoundError,
#[error("Unpredictable error occurred")]
UnknownError,
Expand All @@ -40,9 +40,9 @@ pub enum VaultDBError {
pub enum HashDBError {
#[error("Error while connecting to database")]
DBError,
#[error("Error while finding element in the database")]
#[error("Error while finding hash record in the database")]
DBFilterError,
#[error("Error while inserting element in the database")]
#[error("Error while inserting hash record in the database")]
DBInsertError,
#[error("Unpredictable error occurred")]
UnknownError,
Expand All @@ -66,9 +66,9 @@ pub enum TestDBError {
pub enum FingerprintDBError {
#[error("Error while connecting to database")]
DBError,
#[error("Error while finding element in the database")]
#[error("Error while finding fingerprint record in the database")]
DBFilterError,
#[error("Error while inserting element in the database")]
#[error("Error while inserting fingerprint record in the database")]
DBInsertError,
#[error("Unpredictable error occurred")]
UnknownError,
Expand All @@ -80,13 +80,13 @@ pub enum FingerprintDBError {
pub enum EntityDBError {
#[error("Error while connecting to database")]
DBError,
#[error("Error while finding element in the database")]
#[error("Error while finding entity record in the database")]
DBFilterError,
#[error("Error while inserting element in the database")]
#[error("Error while inserting entity record in the database")]
DBInsertError,
#[error("Unpredictable error occurred")]
UnknownError,
#[error("Element not found in database")]
#[error("Entity record not found in database")]
NotFoundError,
}

Expand Down

0 comments on commit 98d6b20

Please sign in to comment.