Authored by 0xbyt4. Replaces two except-Exception-pass blocks with logger.warning() calls and adds tests for both paths.