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 more detail to 500 page report #2802

Merged
merged 1 commit into from
May 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions augur/api/view/augur_view.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
from flask import render_template, redirect, url_for, session, request, jsonify

Check warning on line 1 in augur/api/view/augur_view.py

View workflow job for this annotation

GitHub Actions / runner / pylint

[pylint] reported by reviewdog 🐶 C0114: Missing module docstring (missing-module-docstring) Raw Output: augur/api/view/augur_view.py:1:0: C0114: Missing module docstring (missing-module-docstring)
from flask_login import LoginManager
from io import StringIO
from .utils import *

Check warning on line 4 in augur/api/view/augur_view.py

View workflow job for this annotation

GitHub Actions / runner / pylint

[pylint] reported by reviewdog 🐶 E0402: Attempted relative import beyond top-level package (relative-beyond-top-level) Raw Output: augur/api/view/augur_view.py:4:0: E0402: Attempted relative import beyond top-level package (relative-beyond-top-level)

Check warning on line 4 in augur/api/view/augur_view.py

View workflow job for this annotation

GitHub Actions / runner / pylint

[pylint] reported by reviewdog 🐶 W0401: Wildcard import utils (wildcard-import) Raw Output: augur/api/view/augur_view.py:4:0: W0401: Wildcard import utils (wildcard-import)
from .init import logger

Check warning on line 5 in augur/api/view/augur_view.py

View workflow job for this annotation

GitHub Actions / runner / pylint

[pylint] reported by reviewdog 🐶 E0402: Attempted relative import beyond top-level package (relative-beyond-top-level) Raw Output: augur/api/view/augur_view.py:5:0: E0402: Attempted relative import beyond top-level package (relative-beyond-top-level)
from .url_converters import *

Check warning on line 6 in augur/api/view/augur_view.py

View workflow job for this annotation

GitHub Actions / runner / pylint

[pylint] reported by reviewdog 🐶 E0402: Attempted relative import beyond top-level package (relative-beyond-top-level) Raw Output: augur/api/view/augur_view.py:6:0: E0402: Attempted relative import beyond top-level package (relative-beyond-top-level)

Check warning on line 6 in augur/api/view/augur_view.py

View workflow job for this annotation

GitHub Actions / runner / pylint

[pylint] reported by reviewdog 🐶 W0401: Wildcard import url_converters (wildcard-import) Raw Output: augur/api/view/augur_view.py:6:0: W0401: Wildcard import url_converters (wildcard-import)

# from .server import User
from ..server import app, db_session

Check warning on line 9 in augur/api/view/augur_view.py

View workflow job for this annotation

GitHub Actions / runner / pylint

[pylint] reported by reviewdog 🐶 E0402: Attempted relative import beyond top-level package (relative-beyond-top-level) Raw Output: augur/api/view/augur_view.py:9:0: E0402: Attempted relative import beyond top-level package (relative-beyond-top-level)
from augur.application.db.models import User, UserSessionToken
from augur.api.routes import AUGUR_API_VERSION
from augur.api.util import get_bearer_token

import time, traceback

Check warning on line 14 in augur/api/view/augur_view.py

View workflow job for this annotation

GitHub Actions / runner / pylint

[pylint] reported by reviewdog 🐶 C0410: Multiple imports on one line (time, traceback) (multiple-imports) Raw Output: augur/api/view/augur_view.py:14:0: C0410: Multiple imports on one line (time, traceback) (multiple-imports)

login_manager = LoginManager()

login_manager.init_app(app)

app.secret_key = getSetting("session_key")

Check warning on line 20 in augur/api/view/augur_view.py

View workflow job for this annotation

GitHub Actions / runner / pylint

[pylint] reported by reviewdog 🐶 E0602: Undefined variable 'getSetting' (undefined-variable) Raw Output: augur/api/view/augur_view.py:20:17: E0602: Undefined variable 'getSetting' (undefined-variable)

app.url_map.converters['list'] = ListConverter

Check warning on line 22 in augur/api/view/augur_view.py

View workflow job for this annotation

GitHub Actions / runner / pylint

[pylint] reported by reviewdog 🐶 E0602: Undefined variable 'ListConverter' (undefined-variable) Raw Output: augur/api/view/augur_view.py:22:33: E0602: Undefined variable 'ListConverter' (undefined-variable)
app.url_map.converters['bool'] = BoolConverter
app.url_map.converters['json'] = JSONConverter

Expand Down Expand Up @@ -48,6 +48,7 @@
traceback.print_tb(error.__traceback__, file=errout)
# traceback.print_exception(error, file=errout)
stacktrace = errout.getvalue()
stacktrace += f"\n{type(error).__name__}: {str(error)}"
errout.close()
except Exception as e:
logger.error(e)
Expand Down
Loading