chargebee / chargebee-ruby

Ruby library for the Chargebee API.
https://apidocs.chargebee.com/docs/api?lang=ruby
MIT License
32 stars 60 forks source link

RestClient::BadRequest Error and JSON::ParseError not Caught #40

Open sshaw opened 5 years ago

sshaw commented 5 years ago

Using v2.6.5.

There's a ChargeBee::Error class but this code does not handle all exceptions so RestClient::BadRequest squeaks through.

The exception is not documented (as most Ruby libs and their exceptions aren't) but it and others are placed into the RestClient::Exceptions::EXCEPTION_MAP constant.


No JSON exceptions are caught here.


There's probably more but that's what I've seen so far.

Also note that RESTClient seems dead. But, maybe that's okay.