From 091080c7e4e6d2b420f666ef52adc4aa3f02cdd3 Mon Sep 17 00:00:00 2001 From: psrok1 Date: Wed, 15 May 2024 14:59:45 +0200 Subject: [PATCH] Remove fallback to json at all --- karton/core/task.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/karton/core/task.py b/karton/core/task.py index 7fdf436..e0e1db2 100644 --- a/karton/core/task.py +++ b/karton/core/task.py @@ -455,11 +455,7 @@ def unserialize_resources(value: Any) -> Any: if parse_resources: task_data = json.loads(data, object_hook=unserialize_resources) else: - try: - task_data = orjson.loads(data) - except orjson.JSONDecodeError: - # fallback, in case orjson raises exception during loading - task_data = json.loads(data) + task_data = orjson.loads(data) # Compatibility with Karton <5.2.0 headers_persistent_fallback = task_data["payload_persistent"].get(