RxApollo icon indicating copy to clipboard operation
RxApollo copied to clipboard

How to get Error Detail

Open horaciosolorio opened this issue 6 years ago • 1 comments

Can you help me please.

I try to get current error received in:

}, onError: { (error) in print(error) })

But i can not access to the error only y can see in console : Optional(BaseViper.RxApolloError.graphQLErrors([No such user found]))

horaciosolorio avatar Nov 16 '18 14:11 horaciosolorio

You must cast or switch on the error :

}, onError: { (error) in
  switch error {
    case let RxApolloError.graphQLErrors(errors):
      // you have now your qualified `errors` here
   default: 
      break
  }

Ded77 avatar Nov 19 '18 15:11 Ded77