artemis icon indicating copy to clipboard operation
artemis copied to clipboard

How to access errors from a call?

Open lnmunhoz opened this issue 2 years ago • 1 comments

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)

lnmunhoz avatar Oct 27 '22 19:10 lnmunhoz

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)

yuki24 avatar Jan 05 '23 05:01 yuki24