lib/httpx/errors.rb in httpx-0.0.2 vs lib/httpx/errors.rb in httpx-0.0.3
- old
+ new
@@ -2,6 +2,15 @@
module HTTPX
Error = Class.new(StandardError)
TimeoutError = Class.new(Error)
+
+ HTTPError = Class.new(Error) do
+ attr_reader :status
+
+ def initialize(status)
+ @status = status
+ super("HTTP Error: #{status}")
+ end
+ end
end