mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-17 17:42:20 +03:00
Remove raise CAPI pretend down on auth requests, add endpoint for which CAPI pretend down raising
This commit is contained in:
parent
92b131f81a
commit
2e90a1bbe9
@ -277,9 +277,6 @@ class Auth(object):
|
||||
|
||||
logger.debug('Attempting refresh with Frontier...')
|
||||
try:
|
||||
if conf_module.capi_pretend_down:
|
||||
raise ServerError(_('Pretending CAPI is down'))
|
||||
|
||||
r = self.session.post(SERVER_AUTH + URL_TOKEN, data=data, timeout=auth_timeout)
|
||||
if r.status_code == requests.codes.ok:
|
||||
data = r.json()
|
||||
@ -364,9 +361,6 @@ class Auth(object):
|
||||
# requests_log.setLevel(logging.DEBUG)
|
||||
# requests_log.propagate = True
|
||||
|
||||
if conf_module.capi_pretend_down:
|
||||
raise ServerError(_('Pretending CAPI is down'))
|
||||
|
||||
r = self.session.post(SERVER_AUTH + URL_TOKEN, data=request_data, timeout=auth_timeout)
|
||||
data_token = r.json()
|
||||
if r.status_code == requests.codes.ok:
|
||||
@ -573,7 +567,7 @@ class Session(object):
|
||||
try:
|
||||
logger.trace_if('capi.query', 'Trying...')
|
||||
if conf_module.capi_pretend_down:
|
||||
raise ServerError('Pretending CAPI is down')
|
||||
raise ServerError(f'Pretending CAPI is down for {endpoint} endpoint')
|
||||
|
||||
r = self.session.get(self.server + endpoint, timeout=timeout) # type: ignore
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user