Open banesullivan opened 2 years ago
I agree the third approach is best.
I'd rather send them as WARNING
, just because they are still technically non-fatal events (since we're not opting for "With a Logging Filter that Raises Exceptions"). The default logging settings will output WARNING
-level messages right next to ERROR
-level messages. For those using Sentry in production, it will also create an issue out of any warning-level messages too. Do you see any reason why we ought to insist on making these ERROR
?
If sentry catches warning level logs than that works for me!
There is a fantastic blog post here on configuring Django to error when templates are missing variables in their context
I think we should incorporate one of the approaches for this at least in the development configuration as it is all too easy to misspell a variable and not notice it or deprecate a variable in the backend code that the SSR templates assume is still present.
Personally, I am in favor of the third approach in that blog: Logging Filter That Promotes Messages to Errors
This will log all missing variables as errors so that we can easily catch them in development and in production without erroring the entire page