lib/whats/client.rb in whatsapp-0.1.1 vs lib/whats/client.rb in whatsapp-0.1.2

- old
+ new

@@ -13,12 +13,10 @@ full_path, headers: { "Content-Type" => "application/json" }, body: payload.to_json ) - unless response.success? - raise Whats::Errors::RequestError.new("API request error.", response) - end + raise Whats::Errors::RequestError.new("API request error.", response) if response.failure? JSON.parse(response.response_body) end private