mercurius-js / mercurius

Implement GraphQL servers and gateways with Fastify
https://mercurius.dev/
MIT License
2.33k stars 234 forks source link

Occasional "error.originalError.errors.map is not a function" errors #1024

Closed ashley-conpago closed 3 months ago

ashley-conpago commented 10 months ago

I very sporadically get errors in my project's tests "error.originalError.errors.map is not a function" which I've traced back to here in mercurius. could easily do a PR do add Array.isArray() there but this might hint at something else (me?) passing the wrong args to defaultErrorFormatter

mcollina commented 10 months ago

I think this is a bug here, would you like to send a PR?

faizplus commented 5 months ago

Hey @ashley-conpago, can you please add steps to reproduce this error?