class Aws::Xml::ErrorHandler

def error_code(body, context)

def error_code(body, context)
  if matches = body.match(/<Code>(.+?)<\/Code>/)
    remove_prefix(unescape(matches[1]), context)
  else
    http_status_error_code(context)
  end
end