Skip to content

Commit

Permalink
Allow Strawberry's GQL errors to pass through without changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
jgadling committed Jan 15, 2025
1 parent 8ccd313 commit 2336853
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions platformics/graphql_api/core/error_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ class DefaultExceptionHandler(ExceptionHandler):
error_message: str = "Unexpected error."

def convert_exception(self, err: Any) -> list[GraphQLError]:
try:
if isinstance(err, GraphQLError) and not err.original_error:
return [err]
except AttributeError:
pass
return [
GraphQLError(
message=self.error_message,
Expand Down

0 comments on commit 2336853

Please sign in to comment.