Skip to content

uri in error report #1060

@magwas

Description

@magwas
diff --git a/src/pdoauth/Decorators.py b/src/pdoauth/Decorators.py
index 2bffe17..fdc61c7 100644
--- a/src/pdoauth/Decorators.py
+++ b/src/pdoauth/Decorators.py
@@ -40,7 +40,9 @@ class Decorators(WebInterface, Responses):

     def errorReport(self, e):
         raisedAt = self.getRaisePoint()
-        app.logger.info("status={0}, descriptor={1}, raised at={2}".format(e.status, e.descriptor, raisedAt))
+        if not hasattr(e, 'uri'):
+            e.uri = None
+        app.logger.info("status={0}, descriptor={1}, raised at={2}, uri={3}".format(e.status, e.descriptor, raisedAt, e.uri))
         if e.status == 302:
             response = self.makeJsonResponse(dict(errors=e.descriptor), e.status)
             response.headers['Location'] = '{0}?errors={1}'.format(e.uri,e.descriptor)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions