MCPcopy Index your code
hub / github.com/praw-dev/praw / check_error

Method check_error

praw/objector.py:21–24  ·  view source on GitHub ↗

Raise an error if the argument resolves to an error object.

(cls, data: list[Any] | dict[str, Any])

Source from the content-addressed store, hash-verified

19
20 @classmethod
21 def check_error(cls, data: list[Any] | dict[str, Any]) -> None:
22 """Raise an error if the argument resolves to an error object."""
23 if error := cls.parse_error(data):
24 raise error
25
26 @classmethod
27 def parse_error(cls, data: list[Any] | dict[str, Any]) -> RedditAPIException | None:

Callers 2

_fetchMethod · 0.80
test_check_errorMethod · 0.80

Calls 1

parse_errorMethod · 0.80

Tested by 1

test_check_errorMethod · 0.64