fix bug with throwing RequestError