policies: catch error in process to not hang requests

This commit is contained in:
Jens Langhammer 2020-12-31 11:16:17 +01:00
parent 68b9c34f78
commit be54ba4fe2

View file

@ -93,4 +93,8 @@ class PolicyProcess(Process):
span: Span
span.set_data("policy", self.binding.policy)
span.set_data("request", self.request)
self.connection.send(self.execute())
try:
self.connection.send(self.execute())
except Exception as exc: # pylint: disable=broad-except
LOGGER.warning(exc)
self.connection.send(PolicyResult(False, str(exc)))