Skip to content

Commit

Permalink
Better GraphQL error reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
madsmtm committed Jun 7, 2020
1 parent cf0e1e3 commit 435dfaf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fbchat/_exception.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,11 @@ def handle_graphql_errors(j):
errors = j["errors"]
if errors:
error = errors[0] # TODO: Handle multiple errors
# TODO: Use `severity` and `description`
# TODO: Use `severity`
raise GraphQLError(
# TODO: What data is always available?
message=error.get("summary", "Unknown error"),
description=error.get("message", ""),
description=error.get("message") or error.get("description") or "",
code=error.get("code"),
debug_info=error.get("debug_info"),
)
Expand Down

0 comments on commit 435dfaf

Please sign in to comment.