From 74eaa8c42b5e755428e21c16e2247a9f9d106fac Mon Sep 17 00:00:00 2001 From: Stef Lewandowski Date: Fri, 16 Dec 2011 16:31:59 +0000 Subject: [PATCH] Debug why crack is failing. --- lib/chargify/parser.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/chargify/parser.rb b/lib/chargify/parser.rb index ca29791..a4a6d22 100644 --- a/lib/chargify/parser.rb +++ b/lib/chargify/parser.rb @@ -3,8 +3,10 @@ class Parser < HTTParty::Parser def parse begin - JSON.parse(body) + puts body + Crack::JSON.parse(body) rescue => e + puts e.message raise(Chargify::Error::UnexpectedResponse.new(e.message), body) end end