Skip to content

Commit 64b297e

Browse files
sebastienfiKyleAMathews
authored andcommitted
Prevent empty error message for GraphQL errors (#2891)
1 parent 4969db8 commit 64b297e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/gatsby/src/internal-plugins/query-runner/graphql-errors.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ function extractError(error: Error): { message: string, docName: string } {
6464
if (matches.index === docRegex.lastIndex) docRegex.lastIndex++
6565
;[, message, docName] = matches
6666
}
67+
if (!message) message = error.toString()
6768
return { message, docName }
6869
}
6970

0 commit comments

Comments
 (0)