Skip to content

logger message severity changed for wrong token #788

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

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion gprofiler/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1032,7 +1032,7 @@ def main() -> None:
else None
)
except APIError as e:
logger.error(f"Server error: {e}")
logger.critical(f"Server error: {e}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wasn't the critical level applicable only for invalid API token?

At the same time we can change the "server error: invalid API key" log to be CRITICAL.
(see this comment)

A known-message check might be needed here to trigger the critical level message in that specific case.
@Jongy , take a look?

sys.exit(1)
except RequestException as e:
proxy = get_https_proxy()
Expand Down