Add 10-second error suppression grace period after SPA navigation
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -50,6 +50,14 @@ class Ajax {
|
||||
const error = event.reason;
|
||||
console.error('Uncaught Ajax error:', error);
|
||||
|
||||
// Suppress errors during navigation grace period
|
||||
// After page navigation, pending requests from the old page may error out
|
||||
// These errors are not relevant to the new page
|
||||
if (typeof Spa !== 'undefined' && Spa.is_within_navigation_grace_period()) {
|
||||
console.log('[Ajax] Suppressing error modal during navigation grace period');
|
||||
return;
|
||||
}
|
||||
|
||||
// Show error modal for uncaught Ajax errors
|
||||
// In debug mode, use fatal_error() for detailed file/line info
|
||||
if (typeof Modal !== 'undefined') {
|
||||
|
||||
Reference in New Issue
Block a user