MCPcopy Create free account
hub / github.com/mongodb/mongo-python-driver / has_error_label

Method has_error_label

pymongo/errors.py:39–44  ·  view source on GitHub ↗

Return True if this error contains the given label. .. versionadded:: 3.7

(self, label: str)

Source from the content-addressed store, hash-verified

37 self._error_labels = set(error_labels or [])
38
39 def has_error_label(self, label: str) -> bool:
40 """Return True if this error contains the given label.
41
42 .. versionadded:: 3.7
43 """
44 return label in self._error_labels
45
46 def _add_error_label(self, label: str) -> None:
47 """Add the given label to this error."""

Calls

no outgoing calls