ruckus / quickbooks-ruby

Quickbooks Online REST API V3 - Ruby
MIT License
374 stars 302 forks source link

Raise IntuitRequestException for unhandled status code #513

Closed anaprimawaty closed 4 years ago

anaprimawaty commented 4 years ago

When there's an unhandled status code, raise Quickbooks::IntuitRequestException instead of RuntimeError to allow better error handling on client side.

drewish commented 4 years ago

What code are you seeing? It would probably be best to just return Quickbooks::ServiceUnavailables for all the 500s. I can’t remember if we added a base class for the 400s.

anaprimawaty commented 4 years ago

Ah it was actually 502, but it has been fixed here https://github.com/ruckus/quickbooks-ruby/pull/484. Closing this in that case. Thanks!