def check_response(res, options)
      if res.status >= 200 && res.status <= 299
        if(options[:mashify] && res.body.instance_of?(Hash))
          Hashie::Mash.new(res.body)
        else
          res.body
        end
      elsif [404, 410].include? res.status
        err_str = "Error processing request: (#{res.status})! #{res.env[:method]} URL: #{res.env[:url]}"
        err_str << "\n Resp Body: #{res.body}"
        raise RequestError::NotFound.new(res), err_str
      else
        err_str = "Error processing request (#{res.status})! #{res.env[:method]} URL: #{res.env[:url]}"
        err_str << "\n Resp Body: #{res.body}"
        raise RequestError.new(res), err_str
      end
    end
def check_response(res, options)
      if res.status >= 200 && res.status <= 299
        if(options[:mashify] && res.body.instance_of?(Hash))
          Hashie::Mash.new(res.body)
        else
          res.body
        end
      elsif [404, 410].include? res.status
        err_str = "Error processing request: (#{res.status})! #{res.env[:method]} URL: #{res.env[:url]}"
        err_str << "\n Resp Body: #{res.body}"
        raise RequestError::NotFound.new(res), err_str
      else
        err_str = "Error processing request (#{res.status})! #{res.env[:method]} URL: #{res.env[:url]}"
        err_str << "\n Resp Body: #{res.body}"
        raise RequestError.new(res), err_str
      end
    end
Internal use only
 Check response codes from request