nebula-studio icon indicating copy to clipboard operation
nebula-studio copied to clipboard

Show UI error when too much data is loaded in the UI

Open johnny-smitherson opened this issue 1 year ago • 0 comments

Is your feature request related to a problem? Please describe.

When working with large networks (e.g. movie recommendation sample space) it's easy to write requests that load too much data on the client. When that happens, the UI hangs and a helpful error message only shows up in the browser logs: Uncaught (in promise) DOMException: The quota has been exceeded..

Captuaaaaare

It would be great to have the web app detect this and show warning/error when too much data is loaded, instead of crashing.

This is unrelated from the NGQL 4MB request/response limit - that case properly shows an error message from the database.

Steps to reproduce

  • Download "movie recommendation" space
  • Run unbounded query
  • Tab/browser hang or crash C222222apture

Describe the solution you'd like

  • catch the above DOMException and any other exception in the UI, and show helpful warning/error popup in the corner of the UI
  • configure some UI warning limits (for example more than 512K of JSON in a single message on the websocket) to warn the user that they're loading too much data
  • configure some UI error limit (for example 2MB JSON in a single message on the websocket) where the app would refuse to return the data

I believe these changes would help us write better queries, by finding out sooner that we are asking for too much data.

Describe alternatives you've considered

Additional context

  • Nebula Graph 3.6.0 , nebula-graph-studio:v3.9.1
  • historical discussion: https://github.com/vesoft-inc/nebula-studio/issues/673

johnny-smitherson avatar Feb 29 '24 11:02 johnny-smitherson