Skip to content

Commit

Permalink
only log error if unhandled
Browse files Browse the repository at this point in the history
  • Loading branch information
vangheem committed Mar 7, 2018
1 parent dc340dc commit e34cc82
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions guillotina/traversal.py
Expand Up @@ -122,15 +122,15 @@ def generate_unauthorized_response(e, request):
def generate_error_response(e, request, error, status=500):
# We may need to check the roles of the users to show the real error
eid = uuid.uuid4().hex
message = _('Error on execution of view') + ' ' + eid
logger.error(message, exc_info=e, eid=eid, request=request)
http_response = query_adapter(
e, IErrorResponseException, kwargs={
'error': error,
'eid': eid
})
if http_response is not None:
return http_response
message = _('Error on execution of view') + ' ' + eid
logger.error(message, exc_info=e, eid=eid, request=request)
return ErrorResponse(error, message, status=status, eid=eid)


Expand Down

0 comments on commit e34cc82

Please sign in to comment.