diff --git a/openlibrary/core/lending.py b/openlibrary/core/lending.py index 66f72c3001d..18f8dce12a9 100644 --- a/openlibrary/core/lending.py +++ b/openlibrary/core/lending.py @@ -1103,6 +1103,9 @@ def _post(self, **payload): ).json() logger.info("POST response: %s", jsontext) return jsontext + except JSONDecodeError: + logger.exception("POST failed to openlibrary.php, no json") + return {} except Exception: # TODO: Narrow exception scope logger.exception("POST failed") raise