From 12caf01dddf30f4a851e7972c0b1803413802028 Mon Sep 17 00:00:00 2001 From: Jacopo Farina Date: Mon, 9 Dec 2024 15:43:20 +0100 Subject: [PATCH] Dectect exception on requests own JSON class, not stdlib JSON --- kafka_schema_registry/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kafka_schema_registry/__init__.py b/kafka_schema_registry/__init__.py index 75b6dea..f8a2fa7 100644 --- a/kafka_schema_registry/__init__.py +++ b/kafka_schema_registry/__init__.py @@ -89,7 +89,7 @@ def publish_schemas( ) try: obj = value_resp.json() - except json.JSONDecodeError: + except JSONDecodeError: logger.error(f'Error decoding response: {value_resp.text}') raise if 'id' not in obj: