File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -78,3 +78,6 @@ def locations(self):
7878 if self .positions and source :
7979 self ._locations = [get_location (source , pos ) for pos in self .positions ]
8080 return self ._locations
81+
82+ class HandledGraphQLError (GraphQLError ):
83+ pass
Original file line number Diff line number Diff line change 88from six import string_types
99from promise import Promise , promise_for_dict , is_thenable
1010
11- from ..error import GraphQLError , GraphQLLocatedError
11+ from ..error import GraphQLError , GraphQLLocatedError , HandledGraphQLError
1212from ..pyutils .default_ordered_dict import DefaultOrderedDict
1313from ..pyutils .ordereddict import OrderedDict
1414from ..utils .undefined import Undefined
@@ -445,6 +445,8 @@ def resolve_or_error(
445445 # type: (...) -> Any
446446 try :
447447 return executor .execute (resolve_fn , source , info , ** args )
448+ except HandledGraphQLError :
449+ raise
448450 except Exception as e :
449451 logger .exception (
450452 "An error occurred while resolving field {}.{}" .format (
You can’t perform that action at this time.
0 commit comments