From a9d46fd778679af66ff32f08e0693ec27b656284 Mon Sep 17 00:00:00 2001 From: "Y.Kentaro" Date: Thu, 23 Oct 2014 11:20:45 +0900 Subject: [PATCH] Add Feedlr::Error::ServiceUnavailableError To support the case below. cursor=# --- lib/feedlr/error.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/feedlr/error.rb b/lib/feedlr/error.rb index 18a6da2..e36a68b 100644 --- a/lib/feedlr/error.rb +++ b/lib/feedlr/error.rb @@ -13,7 +13,8 @@ def errors 401 => Feedlr::Error::Unauthorized, 403 => Feedlr::Error::Forbidden, 404 => Feedlr::Error::NotFound, - 500 => Feedlr::Error::InternalServerError + 500 => Feedlr::Error::InternalServerError, + 503 => Feedlr::Error::ServiceUnavailableError } end end @@ -49,6 +50,9 @@ class ServerError < self; end # Raised when Feedlr returns the HTTP status status_code 500 class InternalServerError < ServerError; end + # Raised when Feedlr returns the HTTP status status_code 503 + class ServiceUnavailableError < ServerError; end + # Raised when the request times out class RequestTimeout < self; end end