From cf861f38a12b3cd94107d79411fbd4b30959965d Mon Sep 17 00:00:00 2001 From: Rishab Ramanathan Date: Mon, 7 Oct 2024 09:05:11 +0800 Subject: [PATCH] fix: adjust storage upload error code range --- src/openlayer/lib/data/batch_inferences.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openlayer/lib/data/batch_inferences.py b/src/openlayer/lib/data/batch_inferences.py index 77172ab0..7337c489 100644 --- a/src/openlayer/lib/data/batch_inferences.py +++ b/src/openlayer/lib/data/batch_inferences.py @@ -65,7 +65,7 @@ def upload_batch_inferences( object_name=object_name, presigned_url_response=presigned_url_response, ) - if response.status_code != 200: + if response.status_code >= 300 or response.status_code < 200: raise ValueError(f"Failed to upload file to storage: {response.text}") # Notify the backend