flow icon indicating copy to clipboard operation
flow copied to clipboard

Improve the client-side exception handling for "Invalid JSON from server" errors

Open johannest opened this issue 8 months ago • 2 comments

Describe your motivation

Every now and then we have a customer who's end users stumble upon a various form of a big ugly "Invalid JSON from server:" error messages. Usually the root cause is proxy or firewall which will dump html content to the Vaadin client-side instead of the UIDL request. At the moment there is no official documentation for the workaround (Vaadin-Refresh token) and no other way than silently refresh the page or redirect (with Vaadin-Refresh token).

Describe the solution you'd like

  • an official documentation of Vaadin-Refresh token
  • a possibility to log the issue in the server (e.g. to see how often it happens)
  • a possibility to customize the scary looking error message to more friendly one with a custom (localized) message
  • a possibility let user to choose what to do: e.g. ignore, refresh the page etc.

Describe alternatives you've considered

Instead of proper documentation, we usually let customer know this StackOverflow answer

Related issues

  • https://github.com/vaadin/flow/issues/19224
  • https://github.com/vaadin/flow/issues/7679
  • https://github.com/vaadin/flow/issues/5651

johannest avatar Jun 05 '24 07:06 johannest