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:
root
2025-12-27 22:01:36 +00:00
parent f08d3de0c8
commit c1485ccbdb
3 changed files with 42 additions and 0 deletions

View File

@@ -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') {