lib/cfoundry/v2/base.rb in cfoundry-0.3.56 vs lib/cfoundry/v2/base.rb in cfoundry-0.3.57

- old
+ new

@@ -147,10 +147,12 @@ return sane_headers(response) end if accept == :json if response.is_a?(Net::HTTPNoContent) - raise "Expected JSON response, got 204 No Content" + raise CFoundry::BadResponse.new( + 204, + "Expected JSON response, got 204 No Content") end parse_json(response.body) else response.body