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

feat: add option to not suppress error output if desired #541

Closed
wants to merge 1 commit into from

Conversation

mpeyper
Copy link
Member

@mpeyper mpeyper commented Jan 15, 2021

What:

Add suppressErrorOutput option (default to true) to allow disabling of the console.error suppression we added with the error boundary fix for useEffect errors.

Why:

It was mentioned in discord that it might be causing issues for some people as its nuked their own console mocks.

How:

Just a boolean option an a if statement to skip over the call that uses filter-console.

Checklist:

  • Documentation updated
  • Tests
  • Ready to be merged

I've put this up for discussion to see if:

  1. this is something we want to add and support
  2. is there a better way we could have handled the error logs than this

Any feedback is welcome.

@codecov
Copy link

codecov bot commented Jan 15, 2021

Codecov Report

Merging #541 (86c88f3) into master (6335c4e) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #541   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           14        14           
  Lines          210       212    +2     
  Branches        23        25    +2     
=========================================
+ Hits           210       212    +2     
Impacted Files Coverage Δ
src/dom/pure.ts 100.00% <100.00%> (ø)
src/helpers/createTestHarness.tsx 100.00% <100.00%> (ø)
src/native/pure.ts 100.00% <100.00%> (ø)
src/server/pure.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6335c4e...86c88f3. Read the comment docs.

@mpeyper mpeyper marked this pull request as draft January 15, 2021 06:08
Copy link
Member

@joshuaellis joshuaellis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I mentioned in discord, I think this is probably the best way, I also definitely agree with default being true to supress. We should add it to the documentation and then it's good to go.

@mpeyper
Copy link
Member Author

mpeyper commented Jan 22, 2021

Closing in favour of #549

@mpeyper mpeyper closed this Jan 22, 2021
@mpeyper mpeyper deleted the feat/show-error-output branch March 1, 2021 22:02
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.

None yet

2 participants