I find fetch very painful to use since the promises don't reject on non-2XX! I use axios instead. This is especially so sad when using async/await :( https://github.com/whatwg/fetch/issues/18
fetch(url)
.then((res) => {
if (res.statusCode < 200 || res.statusCode > 299) {
throw new Error("Why do I have to write this with every request?");
}
});