locked
BizTalk published schema REST service Exception Handling RRS feed

  • Question


  • I have published my schema as REST service, and created an Orchestration with have Receive Port as Request Responseand 
    continued my Orchestration process logic.

    Can anyone please advise how can I handle exceptions for this 2 way Receive port ?
    Do I also need to include 1st receive shape in scope ? 

    Please advise all possible ways of handling exceptions.

    RH

    Thursday, July 25, 2019 2:55 PM

All replies

  • What sort of exceptions do you want to handle?

    Usually you handle exceptions in Orchestrations by adding scopes with an exception handling blocks.   

    No, the 1st receive shape should not need to be in the scope, I've only ever once had an exception occur on the 1st receive shape, and then was a very edge case with an bad email and MIME decoder.

    Thursday, July 25, 2019 7:08 PM
  • any exceptions that comes may be due to REST service exception, service may be down, incorrect data, 400, 404, 500...any time of Exception needs to be handled in Orchestration.

    Do you think if using System.Exception is good enough to handle all the above type of exceptions in Catch block ?

    Please advise


    RH

    Friday, July 26, 2019 12:25 AM
  • If you are exposing a REST service, then if the REST service is down, it would never get to the Orchestration.

    So you wouldn't be handling errors coming from the REST service you are exposing, rather you will be responding with errors if there is an exception with you calling whatever services or systems your Orchestration consumes.  It will be the Orchestration that will have to create a response with the appropriate HTTP Status code.

    Friday, July 26, 2019 12:55 AM
  • so how to handle those type of exceptions ? when I expose as a REST service ? as it never even get to Orch ?

    Please advise ?


    RH

    Friday, July 26, 2019 1:00 AM
  • If your receive location in BizTalk is down, then IIS will throw an error with a 404 status code.

    If your IIS is down then there is no way to throw any exception, but then it will time out at the client side and they need to handle that error.

    Friday, July 26, 2019 1:03 AM
  • but what are the Fault exceptions on Receive port having Request and Response. What will that capture ?

    RH

    Friday, July 26, 2019 1:46 AM