So I have a fetch with an abort controller like so:
async function fn() {
const abortController = new AbortController();
try {
const response = await fetch(/* ... */, { signal: abortController.signal });
// ...
} catch (e) {
// how can I tell if `e` is from a network error (e.g. offline)
// or an error from an abort
}
}
How can I tell if e is a network error or an abort error?