So does Fetch API throw errors? Only if your request doesn’t even make it to the server.
For HTTP errors, you’re on your own. I usually do this:
```javascript
const res = await fetch(url);
if (!res.ok) throw new Error(`Failed with ${res.status}`);
```
Not ideal, but it works.
For HTTP errors, you’re on your own. I usually do this:
```javascript
const res = await fetch(url);
if (!res.ok) throw new Error(`Failed with ${res.status}`);
```
Not ideal, but it works.
