mirror of
				https://github.com/juspay/hyperswitch.git
				synced 2025-10-31 18:17:13 +08:00 
			
		
		
		
	feat(settings): log path to field where config deserialization failed (#78)
Co-authored-by: Arun Raj M <jarnura47@gmail.com>
This commit is contained in:
		| @ -165,10 +165,10 @@ impl Settings { | ||||
|             ) | ||||
|             .build()?; | ||||
|  | ||||
|         config.try_deserialize().map_err(|e| { | ||||
|             logger::error!("Unable to source config file"); | ||||
|             eprintln!("Unable to source config file"); | ||||
|             BachError::from(e) | ||||
|         serde_path_to_error::deserialize(config).map_err(|error| { | ||||
|             logger::error!(%error, "Unable to deserialize application configuration"); | ||||
|             eprintln!("Unable to deserialize application configuration: {error}"); | ||||
|             BachError::from(error.into_inner()) | ||||
|         }) | ||||
|     } | ||||
| } | ||||
|  | ||||
| @ -119,7 +119,7 @@ pub enum BachError { | ||||
|     #[error("{{ error_description: Error while parsing, error_message: {0} }}")] | ||||
|     EParsingError(error_stack::Report<ParsingError>), | ||||
|  | ||||
|     #[error("Environment configuration error: {0}")] | ||||
|     #[error("Application configuration error: {0}")] | ||||
|     ConfigurationError(ConfigError), | ||||
|  | ||||
|     #[error("{{ error_description: Database operation failed, error_message: {0} }}")] | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Sanchith Hegde
					Sanchith Hegde