This PR adds a try...catch to the template so that any unhandled exceptions are caught and returned as an error instead of the generic error along the lines of event loop error - both task and job queues are empty, but expected operations did not resolveInternal error.
This PR also modifies the template so that there is an event.waitUntill on the handler function so that applications can do some work even after the response is sent.
This PR adds a
try...catch
to the template so that any unhandled exceptions are caught and returned as an error instead of the generic error along the lines ofevent loop error - both task and job queues are empty, but expected operations did not resolveInternal error.
This PR also modifies the template so that there is an
event.waitUntill
on the handler function so that applications can do some work even after the response is sent.