implemented silent connection which should not throw any errors

This commit is contained in:
Hazel Noack 2025-06-11 13:53:53 +02:00
parent 593c975418
commit ae997fd0bf
2 changed files with 9 additions and 1 deletions

View File

@ -1,7 +1,7 @@
import argparse
import logging
from .connections import Connection
from .connections import Connection, SilentConnection
from . import cache

View File

@ -151,3 +151,11 @@ class Connection:
json=json,
**kwargs,
))
class SilentConnection(Connection):
def send_request(self, request: requests.Request, attempt: int = 0) -> Optional[requests.Response]:
try:
return super().send_request(request, attempt)
except requests.HTTPError as e:
log.warning(str(e))