4

I've noticed that Chrome is logging all 4xx errors met by fetch while other browsers (at least Safari and Chrome) do not log them.

How can I prevent Chrome fetch from logging to console http request errors like 400 and 422?

SystematicFrank
  • 16,555
  • 7
  • 56
  • 102

1 Answers1

5

You can use the "Hide network messages" option to hide these in the Console. You will still be able to see the error in the Network tab.

Before

No Hide network messages

After

Hide network messages

If you want to filter particular error codes, you could use a regular expression to do this. The following should filter out any messages that contain 4, followed by 2 digits, followed by a space character, followed by ().

^((?!4\d{2}\s\(\)).)*$
Community
  • 1
  • 1
Gideon Pyzer
  • 22,610
  • 7
  • 62
  • 68