Skip to content

Commit 9eb2717

Browse files
committed
fix(storage): check if response is success before trying to parse
1 parent 7d5600c commit 9eb2717

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/storage/src/storage3/file_api.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,8 @@ def create_signed_url(
214214
def _parse_signed_urls(
215215
self, response: Response, download_query: QueryParams
216216
) -> List[CreateSignedUrlResponse]:
217+
if not response.is_success:
218+
return parse_api_error(response)
217219
data = SignedUrlsJsonResponse.validate_json(response.content)
218220
signed_urls = []
219221
for item in data:

0 commit comments

Comments
 (0)