Closed sadraskol closed 7 years ago
Awesome, thanks, this looks like a helpful change. I'll get this merged and a new release published today.
@carlodicelico — the code is still there, it has just been extracted into its own function: https://github.com/peburrows/goth/blob/master/lib/goth/client.ex#L183-L190
Sounds like there might be a different issue. Do you mind providing a few more details about what you're seeing and how to reproduce it?
Ah! I see, thanks & sorry about that. I think I was getting an error that falls outside the ones checked, but have since fixed it. Thanks again.
When an api fails, let's say the client is deleted, or other various reasons, the current implementation is pretty vague on the reason why the token fetch fails, it would display something like
** (ArithmeticError) bad argument in arithmetic expression
.My implementation is not perfect since it does treat each error use cases but it's a bit more explanatory.