no-swallowed-exception
Surface caught operational failures instead of recording them only at debug level.
Why
A handler that catches a specific failure, writes it only to a debug or trace log and then continues makes the failure invisible: production log levels drop the record, the caller observes success and no traceback survives. Leaked resources and partial cleanups then go unnoticed.
Fix
Let the error propagate, or handle it explicitly with a typed result the caller must inspect. For deliberate best-effort cleanup, record it at warning or error level with the exception attached, for example logger.exception(...), logger.warning(..., exc_info=True) or logger.opt(exception=error).warning(...).
Examples
import logging
from google.api_core.exceptions import GoogleAPIError
logger = logging.getLogger(__name__)
def delete_object(store, path: str) -> None: try: store.delete(path=path) except (GoogleAPIError, OSError) as error: logger.debug("cleanup unavailable", extra={"error": type(error).__name__})import logging
from google.api_core.exceptions import GoogleAPIError
logger = logging.getLogger(__name__)
def delete_object(store, path: str) -> None: try: store.delete(path=path) except (GoogleAPIError, OSError) as error: logger.warning("cleanup failed", exc_info=error)