v154 · abort reason
Every place it can surface
One request, one abort, four catch sites. The table records what each one actually received — your reason, or a generic AbortError the platform made up because the real one did not reach that far.
Abort and catch everywhere
The request targets a large same-origin file from this repository, so there is a real body still streaming when the abort lands. That is the point: the interesting failures happen after the fetch promise has already resolved.
| catch site | carried your reason? | what it got |
|---|---|---|
| Not run yet. | ||
code path
const controller = new AbortController();
const response = await fetch(url, { signal: controller.signal });
// The promise has resolved. The body has not finished arriving.
controller.abort({ code: "USER_CANCEL" });
try { await response.text(); }
catch (error) {
// Chrome 154: error.code === "USER_CANCEL"
// Before: error.name === "AbortError", reason lost
}