mercurius icon indicating copy to clipboard operation
mercurius copied to clipboard

Changed error handling for non-GraphQL errors

Open sameer-coder opened this issue 2 years ago • 7 comments

Closes #543

cc: @simoneb

sameer-coder avatar Jan 31 '22 08:01 sameer-coder

Added a new test case and updated some existing ones. Please review

sameer-coder avatar Jan 31 '22 11:01 sameer-coder

I don't think this is doing what we want to do. Don't we want to keep returning an array of errors but simply provide a more informative error about the inner error?

simoneb avatar Jan 31 '22 11:01 simoneb

The inner error message is already being set as the message property on the error in the existing implementation. I am not sure if we have any more information about the error other than the error message.

sameer-coder avatar Jan 31 '22 11:01 sameer-coder

@jonnydgreen could you take a look?

mcollina avatar Jan 31 '22 14:01 mcollina

@jonnydgreen I have updated the docs. Can you please take a look? Thanks

sameer-coder avatar Feb 03 '22 14:02 sameer-coder

@jonnydgreen this seems a semver-major change. wdyt?

mcollina avatar Feb 03 '22 14:02 mcollina

@jonnydgreen this seems a semver-major change. wdyt?

Yeah definitely - especially as we will now be returning a different error responses in certain situations

jonnydgreen avatar Feb 03 '22 16:02 jonnydgreen

right! sounds like a plan!

mcollina avatar Sep 02 '22 12:09 mcollina

I had to revert this change because of #860, we must use 200 everywhere.

mcollina avatar Sep 02 '22 12:09 mcollina

Amazing memory @mcollina !

simoneb avatar Sep 02 '22 12:09 simoneb