uber-ruby icon indicating copy to clipboard operation
uber-ruby copied to clipboard

Raise clearer errors in case of failed requests

Open Emerichenon opened this issue 8 years ago • 4 comments

Emerichenon avatar Aug 29 '16 11:08 Emerichenon

@Emerichenon Few tests break. Also, probably it's not a good idea to raise Uber::Error::BadRequest for every failure code. Making some changes :) // cc @sishen

AnkurGel avatar Sep 04 '16 06:09 AnkurGel

@Emerichenon The error response will raise Farady::Error::ClientError. You can construct a friendly Uber::Error object in Client.rb#L138. Would you mind to update your PR there? Thank you.

sishen avatar Sep 04 '16 07:09 sishen

@AnkurGel Actual author here was working on a student's computer on a tight schedule while helping him with an uber relatied project. I'll make sure the tests passes or are you fixing it ?

@sishen Sure, we did not have much time so I didn't do the best fix in the world, I'll update it next week.

Cheers :)

gabriel-dehan avatar Sep 04 '16 10:09 gabriel-dehan

@sishen @gabriel-dehan Made some changes related to this here : https://github.com/sishen/uber-ruby/pull/21

AnkurGel avatar Sep 04 '16 18:09 AnkurGel