Update catch all Exception handler to add exception message
Before raising this MR, consider whether the following are required, and complete if so:
-
Unit tests -
Metrics -
Documentation update(s)
If not required, please explain in brief why not.
Description
Each of our entrypoints have a catch-all exception block to handle unknown exceptions gracefully, returning INTERNAL
errors to the caller. However only the error code is sent, with no error message of any kind. This makes it hard to understand what went wrong and makes troubleshooting difficult.
This PR adds a simple str(e)
as the message to send in the response, which will at least give a vague idea of what happened that can be more easily investigated.
I also noticed that for Execute/WaitExecute
specifically no error code was set at all, which I've gone ahead and fixed to match the behavior of the other services.
Changes proposed in this merge request:
- Add
context.set_details(str(e))
to the catch all exception handlers in the variousservice.py
files.