Skip to content

Commit

Permalink
Cherry pick branch 'genexuslabs:AzureFunctionsFixes' into beta
Browse files Browse the repository at this point in the history
  • Loading branch information
sjuarez authored and Beta Bot committed Jan 14, 2025
1 parent 92fcf83 commit c79136a
Showing 1 changed file with 2 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,22 +55,9 @@ private void initialize() throws Exception {
InitializeServerlessConfig();
}

protected EventMessageResponse dispatchEvent(EventMessages eventMessages, String rawMessageBody) throws Exception {
EventMessagesList eventMessagesList = new EventMessagesList();
return dispatchEvent(eventMessages,eventMessagesList,rawMessageBody);
}

protected void ExecuteDynamic(EventMessages msgs, String rawMessage) throws Exception {
try {
EventMessageResponse response = dispatchEvent(msgs, rawMessage);
if (response.hasFailed()) {
logger.error(String.format("Messages were not handled. Error: %s", response.getErrorMessage()));
throw new RuntimeException(response.getErrorMessage()); //Throw the exception so the runtime can Retry the operation.
}
} catch (Exception e) {
logger.error(String.format("HandleRequest execution error: %s",e));
throw e; //Throw the exception so the runtime can Retry the operation.
}
EventMessagesList eventMessagesList = new EventMessagesList();
ExecuteDynamic(msgs,eventMessagesList,rawMessage);
}
protected void ExecuteDynamic(EventMessages msgs, EventMessagesList eventMessagesList, String rawMessage) throws Exception {
try {
Expand Down

0 comments on commit c79136a

Please sign in to comment.