1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-17 01:22:19 +03:00

companion.py: change raising exception when pretending CAPI down

This commit is contained in:
norohind 2021-08-16 15:24:01 +03:00
parent 2e90a1bbe9
commit b30b25216b
Signed by: norohind
GPG Key ID: 01C3BECC26FB59E1

View File

@ -567,7 +567,7 @@ class Session(object):
try:
logger.trace_if('capi.query', 'Trying...')
if conf_module.capi_pretend_down:
raise ServerError(f'Pretending CAPI is down for {endpoint} endpoint')
raise ServerConnectionError(f'Pretending CAPI down: {endpoint}')
r = self.session.get(self.server + endpoint, timeout=timeout) # type: ignore