mirror of
				https://github.com/juspay/hyperswitch.git
				synced 2025-11-04 14:07:18 +08:00 
			
		
		
		
	refactor(router): move db models into separate crate and refactoring around it (#125)
This commit is contained in:
		
							
								
								
									
										16
									
								
								crates/storage_models/src/errors.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								crates/storage_models/src/errors.rs
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,16 @@
 | 
			
		||||
#[derive(Debug, thiserror::Error)]
 | 
			
		||||
pub enum DatabaseError {
 | 
			
		||||
    #[error("An error occurred when obtaining database connection")]
 | 
			
		||||
    DatabaseConnectionError,
 | 
			
		||||
    #[error("The requested resource was not found in the database")]
 | 
			
		||||
    NotFound,
 | 
			
		||||
    #[error("A unique constraint violation occurred")]
 | 
			
		||||
    UniqueViolation,
 | 
			
		||||
    #[error("No fields were provided to be updated")]
 | 
			
		||||
    NoFieldsToUpdate,
 | 
			
		||||
    #[error("An error occurred when generating raw SQL query")]
 | 
			
		||||
    QueryGenerationFailed,
 | 
			
		||||
    // InsertFailed,
 | 
			
		||||
    #[error("An unknown error occurred")]
 | 
			
		||||
    Others,
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user