aboutsummaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorFuwn <[email protected]>2026-04-18 09:24:15 +0000
committerFuwn <[email protected]>2026-04-18 09:24:15 +0000
commitd1a91794c32df1a03f67231647e7deb4f0f81e92 (patch)
tree282add62ac4aa254f008b2da5f62f001bbc04c72 /apps
parentbuild(workers): bump wrangler compatibility_date to 2025-01-01 (diff)
downloaddue.moe-d1a91794c32df1a03f67231647e7deb4f0f81e92.tar.xz
due.moe-d1a91794c32df1a03f67231647e7deb4f0f81e92.zip
fix(settings): propagate inner json/handler errors to outer catch
Earlier fix added .catch() handlers to both fetch chains, but the outer .then body called response.json().then(...) without returning the inner promise. That meant rejections from response.json() (e.g. non-JSON response) or from the inner handler body (e.g. a throw in isEqualsJson or data access) floated unhandled. Return the inner promise so its rejection reaches the outer .catch. Also short-circuit early on !response.ok to keep the happy path at the top indentation level. Verified via a standalone promise-graph reproducer: all seven paths (outer fetch reject, non-ok response, json reject, handler throw, push fetch reject, push handler throw, happy path) are caught by their intended handler.
Diffstat (limited to 'apps')
0 files changed, 0 insertions, 0 deletions