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

Traceback swallowed by error handling code #451

Closed
coltonlw opened this issue Sep 1, 2016 · 2 comments
Closed

Traceback swallowed by error handling code #451

coltonlw opened this issue Sep 1, 2016 · 2 comments
Assignees

Comments

@coltonlw
Copy link
Contributor

coltonlw commented Sep 1, 2016

dispatcher method in api.py does not log traceback when it catches an error that is not an instance of webapp2.HTTPException
https://github.com/scitran/core/blob/master/api/api.py#L200
Suggest removing this except block, causing the error to be handled by WSGIApplication._internal_error. Since _internal_error does not log a traceback with the exception, we need to add an error handler for code 500 to log the traceback and then return webob.exc.HTTPInternalServerError which is the same return value as _internal_error. This is better than adding code to log the traceback in the dispatcher function of our router, since any exceptions thrown outside of the router code will also be logged

@coltonlw
Copy link
Contributor Author

coltonlw commented Sep 6, 2016

This should be coordinated with #199 so that the traceback is logged to the request specific logger adapter. Then when we get a traceback and a 500, we'll have contextual request info to aid in debugging.

@coltonlw
Copy link
Contributor Author

fixed by #482

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

2 participants