module Her::Errors
Public Class Methods
exception_class_for_status(status)
click to toggle source
# File lib/her/errors.rb, line 88 def self.exception_class_for_status(status) errors = { 401 => "Unauthorized", 403 => "Forbidden", 404 => "NotFound", 500 => "ServerError", 502 => "BadGateway", 503 => "Unavailable", 504 => "TimeOut" } if errors[status] "Her::Errors::#{errors[status]}".constantize end end