Open perry-mitchell opened 8 years ago
Currently when parsing the Error
, we expect the .stack
to actually start with a copy of the .message
and then continue with the trace lines. That's how most stacks are composed. But I'm sure situations like the one you encountered do occur where the message is not embedded in the stack.
The fix is probably trivial. When parsing the stack and extracting the message, we can compare our extracted message with the string inside .message
, and if they don't match, we'd prepend .message
to the extracted one.
I can do that, but first, I need a minimal reproduction of the situation, if you can provide that please.
I have the same issue in Node.js API Starter Kit (see src/app.js
).
Same problem here
Guys, I need a minimal reproduction of this error to be able to fix it :) A minimal reproduction would be one package.json
file, one index.js
file, and running $ node index.js
should reproduce the error.
I have this problem with GraphQLError instances. I will see if I can make some steps to reproduce.
Never mind, that situation seems to have been fixed very recently: graphql/graphql-js#718.
It seems as though the error's message is stripped if a stack trace is present (ParsedError.coffee:25):
Resulting in something like:
(when no stack is present)
And this when there is a stack: