Skip to content

Commit 2d08496

Browse files
committed
Always extract extensions from the original error if possible
1 parent ad599ff commit 2d08496

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/error/GraphQLError.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ export function GraphQLError( // eslint-disable-line no-redeclare
175175
value: originalError,
176176
},
177177
extensions: {
178-
value: extensions,
178+
value: extensions || (originalError && (originalError: any).extensions),
179179
},
180180
});
181181

src/error/locatedError.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,5 @@ export function locatedError(
3333
originalError && (originalError: any).positions,
3434
path,
3535
originalError,
36-
originalError && (originalError: any).extensions,
3736
);
3837
}

0 commit comments

Comments
 (0)