mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-14 08:17:13 +03:00
CAPI: EDMarketConnector: Don't Session.invalidate() on CredentialsError
This commit is contained in:
parent
885745197c
commit
6c24d9291a
@ -1109,8 +1109,6 @@ class AppWindow(object):
|
||||
self.status['text'] = _('Frontier CAPI server error')
|
||||
|
||||
except companion.CredentialsError:
|
||||
# Redirected back to Auth server - force full re-authentication
|
||||
companion.session.invalidate()
|
||||
companion.session.retrying = False
|
||||
companion.session.login()
|
||||
|
||||
|
@ -788,11 +788,13 @@ class Session(object):
|
||||
# LANG: Frontier CAPI data retrieval failed
|
||||
raise ServerError(f'{_("Frontier CAPI query failure")}: {capi_endpoint}') from e
|
||||
|
||||
# TODO: I don't think this happens any more, it's just a 401 status as above
|
||||
if r.url.startswith(FRONTIER_AUTH_SERVER):
|
||||
logger.info('Redirected back to Auth Server')
|
||||
self.dump(r)
|
||||
raise CredentialsError('Redirected back to Auth Server')
|
||||
|
||||
# TODO: Shouldn't this be covered by raise_for_status() above ?
|
||||
elif 500 <= r.status_code < 600:
|
||||
# Server error. Typically 500 "Internal Server Error" if server is down
|
||||
logger.debug('500 status back from CAPI')
|
||||
|
Loading…
x
Reference in New Issue
Block a user