Also print the exception type when logging query issues
Use "repr(e)" instead of "e" alone (i.e "str(e)") because sometimes builtin exceptions have no message (for example: OSError, TimeoutError)
This commit is contained in:
parent
91ec6ebf1b
commit
a8a9a1ac1f
@ -433,7 +433,7 @@ class Session:
|
||||
raise e from None
|
||||
|
||||
(log.warning if retries < 2 else log.info)(
|
||||
f'[{Session.MAX_RETRIES - retries + 1}] Retrying "{query}" due to {e}')
|
||||
f'[{Session.MAX_RETRIES - retries + 1}] Retrying "{query}" due to {repr(e)}')
|
||||
|
||||
await asyncio.sleep(0.5)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user