Skip to content

Commit

Permalink
Cover for __getitem__ as well
Browse files Browse the repository at this point in the history
  • Loading branch information
maxi297 committed Dec 4, 2024
1 parent 3171b61 commit 6dc1e79
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion airbyte_cdk/sources/streams/http/http_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,11 +522,18 @@ def send_request(


class SkipFailureSQLiteDict(requests_cache.backends.sqlite.SQLiteDict):
def __getitem__(self, key): # type: ignore # lib is not typed
try:
return super().__getitem__(key) # type: ignore # lib is not typed
except Exception as exception:
logger.warning(f"Error while retrieving item from cache: {exception}")

def _write(self, key: str, value: str) -> None:
try:
super()._write(key, value) # type: ignore # lib is not typed
except Exception as exception:
logger.warning(exception)
logger.warning(f"Error while saving item to cache: {exception}")



class SkipFailureSQLiteCache(requests_cache.backends.sqlite.SQLiteCache):
Expand Down

0 comments on commit 6dc1e79

Please sign in to comment.