diff --git a/fbchat/_util.py b/fbchat/_util.py index c9729e9..58fa657 100644 --- a/fbchat/_util.py +++ b/fbchat/_util.py @@ -136,7 +136,7 @@ def handle_payload_error(j): def handle_graphql_errors(j): errors = [] - if "error" in j: + if j.get("error"): errors = [j["error"]] if "errors" in j: errors = j["errors"]