Fix Promises being incorrectly rejected regardless of whether request() returned an error