File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -153,7 +153,7 @@ export function execute(
153
153
// resolved Promise.
154
154
return new Promise ( resolve => {
155
155
resolve ( executeOperation ( context , context . operation , rootValue ) ) ;
156
- } ) . catch ( error => {
156
+ } ) . then ( undefined , error => {
157
157
// Errors from sub-fields of a NonNull type may propagate to the top level,
158
158
// at which point we still log the error and null the parent field, which
159
159
// in this case is the entire response.
@@ -692,7 +692,8 @@ function completeValueWithLocatedError(
692
692
result
693
693
) ;
694
694
if ( isThenable ( completed ) ) {
695
- return ( ( completed : any ) : Promise < * > ) . catch (
695
+ return ( ( completed : any ) : Promise < * > ) . then (
696
+ undefined ,
696
697
error => Promise . reject ( locatedError ( error , fieldASTs , path ) )
697
698
) ;
698
699
}
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ export function graphql(
66
66
)
67
67
) ;
68
68
}
69
- } ) . catch ( error => {
69
+ } ) . then ( undefined , error => {
70
70
return { errors : [ error ] } ;
71
71
} ) ;
72
72
}
You can’t perform that action at this time.
0 commit comments