File tree 1 file changed +10
-1
lines changed
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -254,6 +254,12 @@ def detail(self):
254
254
def status_code (self ) -> int :
255
255
return self .status
256
256
257
+ @property
258
+ def ok (self ) -> bool :
259
+ if self ._response is not None :
260
+ return self ._response .ok
261
+ return False
262
+
257
263
def raise_for_status (self , message = None ):
258
264
if self ._response is None :
259
265
if self ._data and self ._data .get ("detail" ):
@@ -8971,8 +8977,11 @@ def _send_batch_operations(
8971
8977
8972
8978
op_results = result .get ("operations" )
8973
8979
if op_results is None :
8980
+ detail = result .get ("detail" )
8981
+ if detail :
8982
+ raise FailedOperations (f"Operation failed. Detail: { detail } " )
8974
8983
raise FailedOperations (
8975
- "Operation failed. Content: {}" . format ( str ( result ))
8984
+ f "Operation failed. Content: { result . text } "
8976
8985
)
8977
8986
8978
8987
if result .get ("success" ) or not raise_on_fail :
You can’t perform that action at this time.
0 commit comments