module Veeqo::Errors
Public Class Methods
error_klass_for(response)
click to toggle source
# File lib/veeqo/errors.rb, line 21 def self.error_klass_for(response) case response when *server_errors then Errors::ServerError when Net::HTTPUnauthorized then Errors::Unauthorized when Net::HTTPForbidden then Errors::Forbidden else Errors::RequestError end end
server_errors()
click to toggle source
# File lib/veeqo/errors.rb, line 8 def self.server_errors [ OpenSSL::SSL::SSLError, Errno::ETIMEDOUT, Errno::EHOSTUNREACH, Errno::ENETUNREACH, Errno::ECONNRESET, Net::OpenTimeout, SocketError, Net::HTTPServerError, ] end