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

Add ability to filter out expected errors through audit options #4881

Closed
Eccenux opened this issue Mar 28, 2018 · 5 comments
Closed

Add ability to filter out expected errors through audit options #4881

Eccenux opened this issue Mar 28, 2018 · 5 comments

Comments

@Eccenux
Copy link

Eccenux commented Mar 28, 2018

Steps:

  1. Create an application using REST API.
  2. The app checks authorization on load.
  3. Make Best Practices audit in Chrome/Lighthouse.

Result: detects "Browser errors were logged to the console".

Expected: ignore error that (to my knowledge) is a standard REST response.

@patrickhulce
Copy link
Collaborator

patrickhulce commented Mar 28, 2018

It seems like you want browsers to stop logging 401 responses as errors :)

This audit just raises all errors that appear in the console and has no opinion about them which we're unlikely to change.

@Eccenux
Copy link
Author

Eccenux commented Mar 28, 2018

No, not really :-). The 401 might be an important error if you were supposed to be logged in... But I think that is not the case for Lighthouse audits. Lighthouse audits (at least when you prepare for PWA) are run for the start page. And it's quite natural that the user is not logged in on start.

@patrickhulce
Copy link
Collaborator

patrickhulce commented Mar 28, 2018

Some folks have had success using LH on a logged in application and we'd like to support this on best effort basis (#1418). Since we won't be changing the console error audit to ignore specific cases, it seems like some sort of audit option with a 'whitelist' of acceptable errors is what you're looking for? Then you'd be able to configure LH to ignore any potential error that you consider expected for your use case.

@Eccenux
Copy link
Author

Eccenux commented Mar 29, 2018

That would work yes. I guess it's a minor annoyance really... I don't have to have 100 ;-).

@patrickhulce patrickhulce changed the title 401 Unauthorized error should not be registered as a problem in Best Practices audit Add ability to filter out expected errors through audit options Mar 29, 2018
@paulirish
Copy link
Member

We're not going to pursue this at this time.

Though we do understand the usecase and motivation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants