We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2d94628 commit 8d30fc4Copy full SHA for 8d30fc4
src/error/formatError.js
@@ -18,12 +18,10 @@ import type { GraphQLError } from './GraphQLError';
18
*/
19
export function formatError(error: GraphQLError): GraphQLFormattedError {
20
invariant(error, 'Received null or undefined error.');
21
- if (error.locations) {
22
- return {
23
- message: error.message,
24
- locations: error.locations
25
- };
26
- }
+ return {
+ message: error.message,
+ locations: error.locations
+ };
27
}
28
29
export type GraphQLFormattedError = {
0 commit comments