def check_response_status_code(response)
      case response.status_code
      when 200..300
        # Do-nothing
      when 301, 302, 303, 307
        raise GoogleMapsService::Error::RedirectError.new(response), sprintf('Redirect to %s', response.header[:location])
      when 401
        raise GoogleMapsService::Error::ClientError.new(response), 'Unauthorized'
      when 304, 400, 402...500
        raise GoogleMapsService::Error::ClientError.new(response), 'Invalid request'
      when 500..600
        raise GoogleMapsService::Error::ServerError.new(response), 'Server error'
      end
    end
def check_response_status_code(response)
      case response.status_code
      when 200..300
        # Do-nothing
      when 301, 302, 303, 307
        raise GoogleMapsService::Error::RedirectError.new(response), sprintf('Redirect to %s', response.header[:location])
      when 401
        raise GoogleMapsService::Error::ClientError.new(response), 'Unauthorized'
      when 304, 400, 402...500
        raise GoogleMapsService::Error::ClientError.new(response), 'Invalid request'
      when 500..600
        raise GoogleMapsService::Error::ServerError.new(response), 'Server error'
      end
    end
Check HTTP response status code. Raise error if the status is not 2xx.

 @param [Hurley::Response] response Web API response.