Module: Chargify
- Defined in:
- lib/chargify/client.rb
Defined Under Namespace
Classes: Client, UnexpectedResponseError
Class Method Summary collapse
Class Method Details
.custom_parser ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/chargify/client.rb', line 4 def self.custom_parser proc do |data| begin Crack::JSON.parse(data) rescue => e error_msg = "Crack could not parse JSON. It said: #{e.}. Chargify's raw response: #{data}" raise UnexpectedResponseError, error_msg end end end |