CAPI: 'Need auth' is from 401 now, not a redirect

This commit is contained in:
Athanasius committed 2021-08-26 15:15:36 +01:00
1 parent 2179936d6f
commit cd6d22844b
1 file changed
+1 -7
+1 -7
View File
@@ -734,7 +734,7 @@ class Session(object):
"""Worker thread that performs actual CAPI queries."""
logger.debug('CAPI worker thread starting')
def capi_single_query(capi_endpoint: str, timeout: int = capi_default_timeout) -> CAPIData: # noqa: CCR001
def capi_single_query(capi_endpoint: str, timeout: int = capi_default_timeout) -> CAPIData:
"""
Perform a *single* CAPI endpoint query within the thread worker.
@@ -788,12 +788,6 @@ 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')
self.retrying = False
if capi_endpoint == self.FRONTIER_CAPI_PATH_PROFILE and 'commander' not in capi_data: