Method: Deltacloud::EC2::Errors#error_for_code

Defined in:
lib/ec2/helpers/errors.rb

#error_for_code(code) ⇒ Object



37
38
39
40
41
42
43
# File 'lib/ec2/helpers/errors.rb', line 37

def error_for_code(code)
  case code
    when 401 then 'AuthFailure'
    when 500 then 'InternalError'
    else "Unavailable (#{code})"
  end
end