MCPcopy Index your code
hub / github.com/mongodb/mongo-python-driver / _check_write_command_response

Function _check_write_command_response

pymongo/helpers_shared.py:317–326  ·  view source on GitHub ↗

Backward compatibility helper for write command error handling.

(result: Mapping[str, Any])

Source from the content-addressed store, hash-verified

315
316
317def _check_write_command_response(result: Mapping[str, Any]) -> None:
318 """Backward compatibility helper for write command error handling."""
319 # Prefer write errors over write concern errors
320 write_errors = result.get("writeErrors")
321 if write_errors:
322 _raise_last_write_error(write_errors)
323
324 wce = _get_wce_doc(result)
325 if wce:
326 _raise_write_concern_error(wce)
327
328
329def _fields_list_to_dict(

Callers 12

_flush_dataMethod · 0.90
_flush_dataMethod · 0.90
got_app_errorFunction · 0.90
got_app_errorFunction · 0.90
_insert_commandMethod · 0.90
_updateMethod · 0.90
_deleteMethod · 0.90
_insert_commandMethod · 0.90
_updateMethod · 0.90
_deleteMethod · 0.90

Calls 4

_raise_last_write_errorFunction · 0.85
_get_wce_docFunction · 0.85
getMethod · 0.45

Tested by 2

got_app_errorFunction · 0.72
got_app_errorFunction · 0.72