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

Add traceback data to error response when exceptions are raised #50

Conversation

pipermerriam
Copy link
Contributor

What was wrong

Sometimes when an exception occurs on the server side the error response doesn't provide enough context to know where the error actually occurred. Currently the server returns the str(e) where e is the exception which was raised.

How was it fixed.

Added another key to the error data 'traceback' which contains the printed traceback data for the exception.

Cute animal picture

hqdefault

durden and others added 3 commits August 4, 2016 11:18
- Django and Flask are not firm requirements set out in the setup.py so makes
  sense to not mark the tests as failed if they aren't installed.
Skip django/flask tests if not installed
@pipermerriam
Copy link
Contributor Author

Please let me know if there is a different way you'd like to go about this (assuming you find the addition useful). I didn't see a clear way to conditionally include this information based on whether the server was running in some sort of DEBUG mode.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.001%) to 99.618% when pulling 21d4ca7 on pipermerriam:piper/more-detailed-information-from-errors into 5605dc5 on pavlov99:master.

@pipermerriam
Copy link
Contributor Author

Just checking on whether there is any status update on this.

@pavlov99 pavlov99 changed the base branch from master to develop October 5, 2016 03:25
@pavlov99 pavlov99 merged commit 05ec143 into pavlov99:develop Oct 5, 2016
@pavlov99
Copy link
Owner

pavlov99 commented Oct 5, 2016

Hi, @pipermerriam

Sorry for my late update. I'm checking it out.
My main concern is in security here. If a server would send traceback on every error, it could be a potential loophole. Backend side should be fixed instead.

@pipermerriam
Copy link
Contributor Author

Understood. What do you think about enabling this with some sort of flag? Something like JSONRPCResponseManager.handle(..., debug=True)

pavlov99 added a commit that referenced this pull request Oct 28, 2017
…ion-from-errors

Add traceback data to error response when exceptions are raised
pavlov99 added a commit that referenced this pull request Oct 28, 2017
…ion-from-errors

Add traceback data to error response when exceptions are raised
pavlov99 added a commit that referenced this pull request Oct 28, 2017
…ion-from-errors

Add traceback data to error response when exceptions are raised
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

Successfully merging this pull request may close these issues.

None yet

4 participants