artemis
artemis copied to clipboard
How to access errors from a call?
I've tried to access the errors from a call using result.try(:errors)
but all I get is an empty array.
If I use result.original_hash["errors"]
I get the correct results.
I am missing something? (new ruby developer here)
Have you tried result.data.errors
? There are a handful of ways to read error messages depending on what the cause is (e.g. HTTP client/server error, connection error, GraphQL error, etc)