Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0174738

Browse filesBrowse files
authored
feat: show server error message in push (#647)
1 parent 6a532b3 commit 0174738
Copy full SHA for 0174738

1 file changed

+3Lines changed: 3 additions & 0 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎docarray/array/mixins/io/pushpull.py‎

Copy file name to clipboardExpand all lines: docarray/array/mixins/io/pushpull.py
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import os.path
44
import warnings
55
from collections import Counter
6+
from http import HTTPStatus
67
from pathlib import Path
78
from typing import Dict, Type, TYPE_CHECKING, List, Optional, Any
89

@@ -250,6 +251,8 @@ def _get_chunk(_batch):
250251
if response.ok:
251252
return response.json()['data']
252253
else:
254+
if response.status_code >= 400 and 'readableMessage' in response.json():
255+
response.reason = response.json()['readableMessage']
253256
response.raise_for_status()
254257

255258
@classmethod

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.