Handled uncaught exception in command handling
This commit is contained in:
		
							parent
							
								
									e7dac25460
								
							
						
					
					
						commit
						047e3a945a
					
				| @ -48,11 +48,16 @@ namespace Microsoft.eShopOnContainers.Services.Ordering.API.Application.Commands | |||||||
|             else |             else | ||||||
|             { |             { | ||||||
|                 await _requestManager.CreateRequestForCommandAsync<T>(message.Id); |                 await _requestManager.CreateRequestForCommandAsync<T>(message.Id); | ||||||
| 
 | 				try | ||||||
|                 // Send the embeded business command to mediator so it runs its related CommandHandler  | 				{ | ||||||
|                 var result = await _mediator.Send(message.Command); | 					// Send the embeded business command to mediator so it runs its related CommandHandler  | ||||||
|                  | 					var result = await _mediator.Send(message.Command); | ||||||
|                 return result; | 					return result; | ||||||
|  | 				} | ||||||
|  | 				catch | ||||||
|  | 				{ | ||||||
|  | 					return default(R); | ||||||
|  | 				} | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user