Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uri in error report #1060

Open
magwas opened this issue Feb 26, 2019 · 0 comments
Open

uri in error report #1060

magwas opened this issue Feb 26, 2019 · 0 comments

Comments

@magwas
Copy link
Member

magwas commented Feb 26, 2019

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant