I am currently working in the Azure function app in java. Here is the scenario:
- The function app is EventHubTriggered
- Function app calls the endpoint (HTTPUrlConnection)
- It gets the response back
Now, if the response is 200 OK then it's fine, else, I'd want to fail the function app so that the Eventhub can retry to trigger this function app.
I was wondering what should the function app do(the method for EventHub trigger is void). Should I throw an exception for it to fail? If yes, then what exception would it be?