From 7324740ae125e41efabcb62ee5c8b469c1e89141 Mon Sep 17 00:00:00 2001
From: Alex Reisner <alex@alexreisner.com>
Date: Tue, 27 Jan 2015 14:40:40 -0500
Subject: [PATCH] Handle 503 HTTP response.

This is not currently returned by any of the supported lookups,
but it COULD be.
---
 lib/geocoder/lookups/base.rb | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/geocoder/lookups/base.rb b/lib/geocoder/lookups/base.rb
index 43f7cc55..66bc9efe 100644
--- a/lib/geocoder/lookups/base.rb
+++ b/lib/geocoder/lookups/base.rb
@@ -252,6 +252,9 @@ module Geocoder
         elsif response.code.to_i == 429
           raise_error(Geocoder::OverQueryLimitError) ||
             warn("Geocoding API error: 429 Too Many Requests")
+        elsif response.code.to_i == 503
+          raise_error(Geocoder::ServiceUnavailable) ||
+            warn("Geocoding API error: 503 Service Unavailable")
         end
       end
 
-- 
GitLab