Sha256: 705b9e307ee76e276d248815e1a4f398b71befdce38dfb4ac2a21efe557a2bd9
Contents?: true
Size: 460 Bytes
Versions: 7
Compression:
Stored size: 460 Bytes
Contents
module Fog module AWS module Errors def self.match_error(error) matcher = lambda {|s| s.match(/(?:.*<Code>(.*)<\/Code>)(?:.*<Message>(.*)<\/Message>)/m)} [error.message, error.response.body].each(&Proc.new {|s| match = matcher.call(s) return {:code => match[1].split('.').last, :message => match[2]} if match }) {} # we did not match the message or response body end end end end
Version data entries
7 entries across 7 versions & 1 rubygems