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

resweb should default to running Flask with debug=True #16

Open
ghedsouza opened this issue Jan 20, 2015 · 1 comment
Open

resweb should default to running Flask with debug=True #16

ghedsouza opened this issue Jan 20, 2015 · 1 comment

Comments

@ghedsouza
Copy link

Letting Flask swallow exceptions (e.g. redis.exceptions.ConnectionError) in normal mode hides errors behind a generic 500 error page that doesn't tell you what went wrong. If you run Flask with debug=True instead, you get the original exception presented in the response (as well as in the log), which is much more useful.

Relavent code in core.py:

def main():
    app.run(debug=True, host=app.config['SERVER_HOST'], port=int(app.config['SERVER_PORT']))
@ghedsouza
Copy link
Author

Alternatively, we can just add a custom 500 error handler which forwards the actual error in the response (http://flask.pocoo.org/docs/0.10/patterns/errorpages/).

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