Browse Source
			
			
			Change error response to be closer to upstream
			
			
				pull/216/head
			
			
		 
		
			
				
					
						
						Daniel García
					
					7 years ago
					
				 
				
			 
		 
		
			
				
					
					No known key found for this signature in database
					
						
							GPG Key ID: FC8A7D14C3CD543A
						
					
				
			
		
		
		
	
		
			
				 1 changed files with 
8 additions and 
7 deletions
			 
			
		 
		
			
				- 
					
					
					 
					src/util.rs
				
 
			
		
		
			
			
			
			
			
			
				
				
					
						
							
								
									
	
		
		
			
				
					| 
						
						
							
								
							
						
						
					 | 
					@ -6,17 +6,18 @@ macro_rules! err { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    ($err:expr, $msg:expr) => {{ | 
					 | 
					 | 
					    ($err:expr, $msg:expr) => {{ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        println!("ERROR: {}", $msg); | 
					 | 
					 | 
					        println!("ERROR: {}", $msg); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        err_json!(json!({ | 
					 | 
					 | 
					        err_json!(json!({ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					          "Message": $err, | 
					 | 
					 | 
					        "error": $err, | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					          "ValidationErrors": { | 
					 | 
					 | 
					        "error_description": $err, | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            "": [$msg,], | 
					 | 
					 | 
					        "ErrorModel": { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					          }, | 
					 | 
					 | 
					          "Message": $msg, | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					          "ValidationErrors": null, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					          "ExceptionMessage": null, | 
					 | 
					 | 
					          "ExceptionMessage": null, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					          "ExceptionStackTrace": null, | 
					 | 
					 | 
					          "ExceptionStackTrace": null, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					          "InnerExceptionMessage": null, | 
					 | 
					 | 
					          "InnerExceptionMessage": null, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					          "Object": "error", | 
					 | 
					 | 
					          "Object": "error" | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        })) | 
					 | 
					 | 
					        }})) | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					    }}; | 
					 | 
					 | 
					    }}; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					    ($msg:expr) => { err!("The model state is invalid", $msg) } | 
					 | 
					 | 
					    ($msg:expr) => { err!("unknown_error", $msg) } | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					} | 
					 | 
					 | 
					} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					#[macro_export] | 
					 | 
					 | 
					#[macro_export] | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					
  |