File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -177,11 +177,29 @@ public async Task Process100Invoices_ValidatesOutputAccuracy()
177177 capturedOutputs . Add ( classifiedOutput ) ;
178178 }
179179 }
180+ catch ( InvalidOperationException ex )
181+ {
182+ invoiceStopwatch . Stop ( ) ;
183+ latencies . Add ( invoiceStopwatch . Elapsed . TotalSeconds ) ;
184+ _httpOutputLoggerMock . Object . LogError ( ex , "Invalid operation processing invoice {InvoiceNumber}" , invoice . InvoiceNumber ) ;
185+ }
186+ catch ( TimeoutException ex )
187+ {
188+ invoiceStopwatch . Stop ( ) ;
189+ latencies . Add ( invoiceStopwatch . Elapsed . TotalSeconds ) ;
190+ _httpOutputLoggerMock . Object . LogError ( ex , "Timeout processing invoice {InvoiceNumber}" , invoice . InvoiceNumber ) ;
191+ }
192+ catch ( HttpRequestException ex )
193+ {
194+ invoiceStopwatch . Stop ( ) ;
195+ latencies . Add ( invoiceStopwatch . Elapsed . TotalSeconds ) ;
196+ _httpOutputLoggerMock . Object . LogError ( ex , "HTTP error processing invoice {InvoiceNumber}" , invoice . InvoiceNumber ) ;
197+ }
180198 catch ( Exception ex )
181199 {
182200 invoiceStopwatch . Stop ( ) ;
183201 latencies . Add ( invoiceStopwatch . Elapsed . TotalSeconds ) ;
184- _httpOutputLoggerMock . Object . LogError ( ex , "Failed to process invoice {InvoiceNumber}" , invoice . InvoiceNumber ) ;
202+ _httpOutputLoggerMock . Object . LogError ( ex , "Unexpected error processing invoice {InvoiceNumber}" , invoice . InvoiceNumber ) ;
185203 }
186204 }
187205
You can’t perform that action at this time.
0 commit comments