Handling uncaught exceptions in Vaadin 10. Custom notification doesn't appe

Error is logged. Notification appears in Vaadin 8, but doesn’t appear in Vaadin 10. System message (see attachment) appears instead.
What’s wrong ? How to replace system message with a custom one ?

protected open fun newErrorHandler(): (ErrorEvent) -> Unit = { e: ErrorEvent ->
	log.error("Vaadin UI uncaught exception ${e.throwable}", e.throwable)
	Notification.show("Oops: An error occurred, and we are really sorry about that. Already working on the fix!", 5000, Notification.Position.TOP_CENTER)
}

17354226.png

Hi, it’s a bug from flow-server version embedded with Vaadin 10. Here is the issue in GitHub : https://github.com/vaadin/flow/issues/801

It’s already fixed but you need to upgrade your flow-server version.

I have the latest version of Vaadin

com.vaadin vaadin-spring-boot-starter 11.0.1

There is nothing to upgrade to.

It’s written Vaadin 10 in your thread title.

Look at the ticket resolution, the fix is not embedded with Vaadin 11.0.1.

Try to upgrade your “flow-server” dependency (with dependencyManagment or equivalent).

Regards.

Thank you.
vaadin-spring-boot-starter still depends on vaadin-flow 1.0.5, so I have added dependencies on vaadin-flow 1.1.0 directly and my notification starts to appear.

Glad to hear it works.

Cheers