Skip to content

Commit

Permalink
[2051] Re-add missing context
Browse files Browse the repository at this point in the history
It's not a refactor if I don't accidentally nuke a lang comment
  • Loading branch information
Rixxan committed Dec 1, 2023
1 parent 170b86b commit f30fb56
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions companion.py
Original file line number Diff line number Diff line change
Expand Up @@ -865,11 +865,15 @@ def handle_http_error(response: requests.Response, endpoint: str):
self.dump(response)

if response.status_code == 401:
# TODO: This needs to try a REFRESH, not a full re-auth
# No need for translation, we'll go straight into trying new Auth
# and thus any message would be overwritten.
# CAPI doesn't think we're Auth'd
raise CredentialsRequireRefresh('Frontier CAPI said "unauthorized"')

if response.status_code == 418:
# "I'm a teapot" - used to signal maintenance
# LANG: Frontier CAPI returned 418, meaning down for maintenance
raise ServerError(_("Frontier CAPI down for maintenance"))

logger.exception('Frontier CAPI: Misc. Error')
Expand Down
2 changes: 1 addition & 1 deletion plug.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def __init__(self, name: str, loadfile: str | None, plugin_logger: logging.Logge
else:
logger.info(f'plugin {name} disabled')

def _get_func(self, funcname: str): # Removing Unhelpful Type Hint
def _get_func(self, funcname: str):
"""
Get a function from a plugin.
Expand Down

0 comments on commit f30fb56

Please sign in to comment.