Azure / azure-functions-java-worker

Java runtime and core types for Microsoft Azure Functions
MIT License
89 stars 56 forks source link

update to catch Throwable for execute method #702

Open kaibocai opened 1 year ago

kaibocai commented 1 year ago

Issue describing the changes in this PR

resolves #295

Pull request checklist

Additional information

Catching Exception will igore Error happend in java worker process or customer code. This resulted in host hanging up for 30mins and time out, since host never get chance to know that an Error happened in java worker. This is because Error won't be caught and it will break the current logics to response the host request through grpc.

image

Update to catch Throwable so that any Error type will also be caught and inform host through grpc. Didn't re-throw the Throwable as there is not much difference, as long as we get this Error info passed back to host.