debug range and returns an error if we receive a 3xx status