Log exception on each ResourceInvalid to make debugging easier

This commit is contained in:
Anna Sirota 2021-04-26 17:40:03 +02:00
parent d9d3b73070
commit 8f3a03d311

View File

@ -663,7 +663,7 @@ class PillarServer(BlinkerCompatibleEve):
return self.pillar_error_handler(error)
def handle_sdk_resource_invalid(self, error):
self.log.info('Forwarding ResourceInvalid exception to client: %s', error, exc_info=True)
self.log.exception('Forwarding ResourceInvalid exception to client: %s', error, exc_info=True)
# Raising a Werkzeug 422 exception doens't work, as Flask turns it into a 500.
return _('The submitted data could not be validated.'), 422