Skip to content

Conversation

@wreiske
Copy link
Contributor

@wreiske wreiske commented Nov 25, 2025

  • Add error badge in bottom-left corner showing error count
  • Add modal with detailed error information and stack traces
  • Implement graceful failure with inline placeholders for missing templates
  • Add error deduplication to prevent duplicate entries
  • Integrate with HMR to auto-clear errors when templates are fixed
  • Add accessibility features (ARIA labels, keyboard navigation)
  • Auto-disable in production mode
  • Add TypeScript definitions for new public API

BREAKING CHANGE: Missing template errors now show placeholders instead of throwing, which may change error handling behavior in some edge cases.

Before Change

Before this PR, blaze template issues would just result in the entire app not working.

Screenshot 2025-11-25 at 1 23 27 AM

After Change

Now the app works, AND it will gracefully continue rendering the rest of the app! Also a nice little error window to know where you messed up.

Screenshot 2025-11-25 at 1 22 11 AM Screenshot 2025-11-25 at 1 22 22 AM

- Add error badge in bottom-left corner showing error count
- Add modal with detailed error information and stack traces
- Implement graceful failure with inline placeholders for missing templates
- Add error deduplication to prevent duplicate entries
- Integrate with HMR to auto-clear errors when templates are fixed
- Add accessibility features (ARIA labels, keyboard navigation)
- Auto-disable in production mode
- Add TypeScript definitions for new public API

BREAKING CHANGE: Missing template errors now show placeholders instead of
throwing, which may change error handling behavior in some edge cases.
@italojs
Copy link
Member

italojs commented Nov 25, 2025

loved, waitting for the green CI

const error = new Error("No such template: " + name);
Blaze._reportException(error, 'Template lookup error:');
// Return an error placeholder template instead of throwing
return Blaze._errorPlaceholder(name, error);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To avoid a breaking change, we can add the errors in a public/exported/global array, maintaining the current error throw.

Then we can handle the frontend template with a try/catch; it will maintain the current error handling behavior without breaking anyone and will add this new error list as a new or optional feature.

Enhances Blaze template compilation error handling to display errors in the browser overlay and console, making them more visible to developers. Also fixes an instanceof check in html-scanner-tests.js and ensures parse errors are properly propagated in html-tools. Updates package versions and interdependencies to 2.0.1 for consistency.
@jankapunkt
Copy link
Collaborator

What's the actual issue with the ci here? Is this a test runner issue or due to a breaking change?

@jankapunkt
Copy link
Collaborator

We can continue with this, once #486 is merged

@jankapunkt jankapunkt added this to the 3.1 milestone Dec 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants