Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't suppress useful errors #4912

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ibesora
Copy link
Collaborator

@ibesora ibesora commented Oct 28, 2024

This PR avoids suppressing any error that's not an abort error.
We were swallowing all of them and I found difficult to debug GLSL shaders with that happening.
Fixes #4532

Launch Checklist

  • Confirm your changes do not include backports from Mapbox projects (unless with compliant license) - if you are not sure about this, please ask!
  • Briefly describe the changes in this PR.
  • Link to related issues.
  • Include before/after visuals or gifs if this PR includes visual changes.
  • Write tests for all new functionality.
  • Document any changes to public APIs.
  • Post benchmark scores.
  • Add an entry to CHANGELOG.md under the ## main section.

@codecov-commenter
Copy link

codecov-commenter commented Oct 28, 2024

Codecov Report

Attention: Patch coverage is 83.33333% with 1 line in your changes missing coverage. Please review.

Project coverage is 71.78%. Comparing base (d42e0da) to head (01cf6ea).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/ui/map.ts 83.33% 0 Missing and 1 partial ⚠️

❗ There is a different number of reports uploaded between BASE (d42e0da) and HEAD (01cf6ea). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (d42e0da) HEAD (01cf6ea)
9 8
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #4912       +/-   ##
===========================================
- Coverage   89.94%   71.78%   -18.17%     
===========================================
  Files         265      265               
  Lines       37977    37982        +5     
  Branches     2529     2190      -339     
===========================================
- Hits        34159    27265     -6894     
- Misses       2951     9459     +6508     
- Partials      867     1258      +391     

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

@HarelM
Copy link
Collaborator

HarelM commented Oct 28, 2024

I think we should only catch abort error, see the following issue as well:

@ibesora ibesora changed the title Don't suppress WebGL errors Don't suppress useful errors Oct 28, 2024
@ibesora
Copy link
Collaborator Author

ibesora commented Oct 28, 2024

I think we should only catch abort error, see the following issue as well:

When doing that I discovered that we were swallowing some errors when running unit tests. I'll move this PR to draft mode and ping you back when I got those fixed

@ibesora ibesora marked this pull request as draft October 28, 2024 14:57
@HarelM
Copy link
Collaborator

HarelM commented Oct 28, 2024

This might also be relevant to this issue (hopefully fix it?):

The following PR is an attempt to fix this I believe:

The following PR is the migration of the actor from callback to promises, which also changed the frame and abort errors to use abort controller and what probably started all this issue:

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.

v4.0.0 silently swallows errors in load event
3 participants