lib/lvs/json_service/request.rb in LVS-JSONService-0.2.5 vs lib/lvs/json_service/request.rb in LVS-JSONService-0.2.6

- old
+ new

@@ -66,9 +66,13 @@ if response.is_a?(Net::HTTPNotFound) raise LVS::JsonService::NotFoundError.new("404 Found for the service", 404, service, args) end + if response.is_a?(Net::HTTPNotModified) + raise LVS::JsonService::NotModified.new("304 Data hasn't changed", 304, service, args) + end + response end def run_remote_request(service, args, options = {}) LVS::JsonService::Logger.debug "Requesting '#{service}' with #{args.to_json}"