You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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?
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
The text was updated successfully, but these errors were encountered: