Skip to content

Conversation

@Karkbauer
Copy link
Contributor

@Karkbauer Karkbauer commented Jul 8, 2025

Q A
Is bugfix? ✔️
New feature?
Breaks BC?
Fixed issues

In cases when fetch(...) results in an error (for example, a network issue or the request is aborted), allow the call site to choose whether to ignore the error, or handle it. As the the toolbar has a separate promise chain, that the call site has no access to, rethrowing the error causes unnecessary noise in console logs when the error has already been handled by the call site.

This separate promise chain is not used after updating the stackElement array, so its safe to not rethrown error.

Before:

  • Unhandled errors log two messages in console
  • Handled errors log one message in console

After:

  • Unhandled errors log one message in console
  • Handled errors log none messages in console

An example where no error message is expected to be logged now:

const controller = new AbortController();
fetch('/my/path', {signal: controller.signal})
  .catch(e => {
    if (e.name !== 'AbortError') {
      throw e;
    }
  });
controller.abort();

In cases when `fetch(...)` results in an error (for example, a network issue or the request is aborted), allow the call site to choose whether to ignore the error, or handle it. As the the toolbar has a separate promise chain, that the call site has no access to, rethrowing the error causes unnecessary noise in console logs when the error has already been handled by the call site.

This separate promise chain is not used after updating the `stackElement` array, so its safe to remove the rethrown error.

Before:
* Unhandled errors log two messages in console 
* Handled errors log one message in console

After:
* Handled errors log one message in console 
* Handled errors log none messages in console

An example where no error message is expected to be logged now:

```js
const controller = new AbortController();
fetch('/my/path', {signal: controller.signal})
  .catch(e => {
    if (e.name !== 'AbortError') {
      throw e;
    }
  });
controller.abort();
```
@codecov
Copy link

codecov bot commented Jul 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (master@9026d8a). Learn more about missing BASE report.

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #541   +/-   ##
=========================================
  Coverage          ?   46.07%           
=========================================
  Files             ?       26           
  Lines             ?     1593           
  Branches          ?        0           
=========================================
  Hits              ?      734           
  Misses            ?      859           
  Partials          ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@samdark samdark merged commit 47da053 into yiisoft:master Jul 8, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants