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):
78
78
if self .positions and source :
79
79
self ._locations = [get_location (source , pos ) for pos in self .positions ]
80
80
return self ._locations
81
+
82
+ class HandledGraphQLError (GraphQLError ):
83
+ pass
Original file line number Diff line number Diff line change 8
8
from six import string_types
9
9
from promise import Promise , promise_for_dict , is_thenable
10
10
11
- from ..error import GraphQLError , GraphQLLocatedError
11
+ from ..error import GraphQLError , GraphQLLocatedError , HandledGraphQLError
12
12
from ..pyutils .default_ordered_dict import DefaultOrderedDict
13
13
from ..pyutils .ordereddict import OrderedDict
14
14
from ..utils .undefined import Undefined
@@ -445,6 +445,8 @@ def resolve_or_error(
445
445
# type: (...) -> Any
446
446
try :
447
447
return executor .execute (resolve_fn , source , info , ** args )
448
+ except HandledGraphQLError :
449
+ raise
448
450
except Exception as e :
449
451
logger .exception (
450
452
"An error occurred while resolving field {}.{}" .format (
You can’t perform that action at this time.
0 commit comments