Skip to content

Commit 2d94628

Browse files
committed
simplify formatError to always include locations
1 parent bd2cd6b commit 2d94628

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/error/formatError.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,11 @@ export function formatError(error: GraphQLError): GraphQLFormattedError {
2424
locations: error.locations
2525
};
2626
}
27-
return {
28-
message: error.message
29-
};
3027
}
3128

3229
export type GraphQLFormattedError = {
3330
message: string,
34-
locations?: Array<GraphQLErrorLocation>
31+
locations: ?Array<GraphQLErrorLocation>
3532
};
3633

3734
export type GraphQLErrorLocation = {

0 commit comments

Comments
 (0)