When the exception raise, it will return this error.
Traceback (most recent call last):
File "/home/appuser/.local/lib/python3.8/site-packages/grpc/_server.py", line 435, in _call_behavior
response_or_iterator = behavior(argument, context)
File "/home/appuser/.local/lib/python3.8/site-packages/py_grpc_prometheus/prometheus_server_interceptor.py", line 95, in new_behavior
self._compute_error_code(e).name)
AttributeError: "str" object has no attribute "name"
This is because _compute_error_code is returning a string instead of StatusCode enum.
When the exception raise, it will return this error.
This is because
_compute_error_code
is returning a string instead of StatusCode enum.