-
Is there a way to catch 404 errors so I can 1) prevent them from being logged in the console and 2) count them for alerting? I want to stop them from being logged because my server's logs get analyzed for exceptions, e.g.
|
Beta Was this translation helpful? Give feedback.
Answered by
EskelCz
Mar 12, 2025
Replies: 2 comments 2 replies
-
The only way I found is this:
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Dig-Doug
-
Is there no more canonical way than this, @Rich-Harris ? This could really blow up log size on some sites |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The only way I found is this:
hooks.server.js