In BizTalk 2013 / R2 (CU6), I saw another application / orchestration in my current client that seems to be doing this, but my application / orchestration is not.
I cloned their send port by exporting, editing, and then importing, changing only the name and binding of operations / methods. It has "activate routing for erroneous messages."
It looks like I caught him in an orchestration using System.Exception, but I still see that SendPort is paused (resumed) and a routing error (not recovered).
Sample error that I catch (I force the error to specifically test error handling).
System.Net.WebException: The remote server returned an unexpected response: (400) Bad request. {"HttpStatusCode": 400, "httpMessage": "Bad Request", "errorMessage": "Unable to process the shipment" request "," errors ": [{" severity ":" ERROR "," message ":" No credentials found for this provider. Have you added them to the ABC dashboard, source? ":" SYSTEM "}]," supportReferenceId ":" 31eee61a-8770-4524-Bad-2d906a53ab48 "}
I saw some other blogs and questions indicating that 500 errors did not return and that the http status is not set. But I did not see anything about the suspended SendPorts. Also similar to today, my System.Exception did not catch it, but I cannot return on time to be sure.
I have a retry counter on SendPort up to 0.
Also, what actually determines which http statuses can return to orchestration? My colleagueβs code also checked on 400, 401 and 403.
Related question: BizTalk Catch Http Response Code
Update: my colleague is in another team, but I heard an answer from her. She had another orchestration that simply βeatsβ an error message to avoid errors.