To me, the best model for handling errors in rich JS apps has always been event capture. By trapping an event at an appropriate DOM level you can provide appropriate feedback to the user. I'm having trouble implementing this kind of error handling in my Polymer app, and I think it has to do with Shadow DOM event bubbling.
I'd like to be able to have multiple nested layers of shadow DOM, specifically with <core-ajax> elements, but be able to hear the core-error events all the way up the stack (and hopefully all the way to document). This would allow me to, e.g., display a proper error at the form level when a form submission fails, but for generic fetch errors display a global error message. So far trying to do this has not yielded success. The events don't seem to be bubbling through which may well be as intended. Do you have any advice on error handling other than "attach an on-core-error to every single core-ajax in your app"? I have a few ideas, but wanted to know if there was a clever way anyone on here has figured out. Follow Polymer on Google+: plus.google.com/107187849809354688692 --- You received this message because you are subscribed to the Google Groups "Polymer" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/3f323983-8003-4d14-a23e-dacae2556232%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
