laurengarcia / url-metadata

NPM module: Request a url and scrape the metadata from its HTML using Node.js or the browser.
https://www.npmjs.com/package/url-metadata
MIT License
166 stars 44 forks source link

Fixed issue that caused promise to neither resolve nor reject. #5

Closed bb-work closed 5 years ago

bb-work commented 6 years ago

When a URL returned a non-200 status code, the promise neither resolved nor rejected. This fix causes the promise to correctly reject on a bad status code.

laurengarcia commented 5 years ago

Merged and fixed here: https://github.com/LevelNewsOrg/url-metadata/commit/6412d87ca0e950a8d2068432d80cd0b431f2038d