mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-06-10 04:12:15 +03:00
Merge pull request #1098 from EDCD/enhancement/status-message_CAPI-down
CAPI: Make user-visible error text more obvious
This commit is contained in:
commit
74560c369d
@ -230,6 +230,12 @@
|
|||||||
/* Section heading in settings. [prefs.py] */
|
/* Section heading in settings. [prefs.py] */
|
||||||
"File location" = "File location";
|
"File location" = "File location";
|
||||||
|
|
||||||
|
/* Failures to access Frontier CAPI endpoints [companion.py] */
|
||||||
|
"Frontier CAPI query failure" = "Frontier CAPI query failure";
|
||||||
|
|
||||||
|
/* Server errors from Frontier CAPI server [companion.py] */
|
||||||
|
"Frontier CAPI server error" = "Frontier CAPI server error";
|
||||||
|
|
||||||
/* CQC rank. [stats.py] */
|
/* CQC rank. [stats.py] */
|
||||||
"Gladiator" = "Gladiator";
|
"Gladiator" = "Gladiator";
|
||||||
|
|
||||||
|
@ -541,7 +541,7 @@ class Session(object):
|
|||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.debug('Attempting GET', exc_info=e)
|
logger.debug('Attempting GET', exc_info=e)
|
||||||
raise ServerError(f'unable to get endpoint {endpoint}') from e
|
raise ServerError(f'{_("Frontier CAPI query failure")}: {endpoint}') from e
|
||||||
|
|
||||||
if r.url.startswith(SERVER_AUTH):
|
if r.url.startswith(SERVER_AUTH):
|
||||||
logger.info('Redirected back to Auth Server')
|
logger.info('Redirected back to Auth Server')
|
||||||
@ -556,7 +556,7 @@ class Session(object):
|
|||||||
# Server error. Typically 500 "Internal Server Error" if server is down
|
# Server error. Typically 500 "Internal Server Error" if server is down
|
||||||
logger.debug('500 status back from CAPI')
|
logger.debug('500 status back from CAPI')
|
||||||
self.dump(r)
|
self.dump(r)
|
||||||
raise ServerError(f'Received error {r.status_code} from server')
|
raise ServerError(f'{_("Frontier CAPI server error")}: {r.status_code}')
|
||||||
|
|
||||||
try:
|
try:
|
||||||
r.raise_for_status() # Typically 403 "Forbidden" on token expiry
|
r.raise_for_status() # Typically 403 "Forbidden" on token expiry
|
||||||
|
Loading…
x
Reference in New Issue
Block a user