lib/geo_certs/exceptions.rb in geocerts-0.0.17 vs lib/geo_certs/exceptions.rb in geocerts-0.0.18
- old
+ new
@@ -57,10 +57,18 @@
def warnings
@warnings ||= []
end
+ def parameters
+ @parameters ||= {}
+ end
+
+ def parameters=(value)
+ @parameters = value
+ end
+
def response=(response) # :nodoc:
@response = response
if !response.respond_to?(:body)
return @response
@@ -90,9 +98,10 @@
self.errors << GeoCerts::Error.new(:code => error['code'], :message => error['message'])
end
[errors_and_warnings['errors']['warning']].compact.flatten.each do |error|
self.warnings << GeoCerts::Warning.new(:code => error['code'], :message => error['message'])
end
+ self.parameters = errors_and_warnings['errors']['parameters']
end
def decode(content_encoding, body)
if content_encoding == 'gzip' and not body.empty?
Zlib::GzipReader.new(StringIO.new(body)).read