finos / finos/legend-studio

Feature request: Global catch-all for unhandled error that could crash the app and cause users to lose data

Open
#2,016 0 comments 0 reactions 0 assignees View on GitHub
Application: Studio Component: UX/Design Studio Core Team Type: Feature Request
Dominant language
TypeScript
Stars
111
Forks
149
Avg merge
9h 39m
Merged PRs (30d)
63

Description

### Similar requests

- [X] I have searched and found no existing similar requests

### How are you using Legend?

Legend Studio, Legend Query

### What problems are you trying to solve?

For editors like Query and Studio, we need a global strategy to deal with unhandled exception/error that could potentially break the app. We don't want something like https://github.com/finos/legend-studio/issues/2015 to happen since it can cause loss of valuable work

### Describe the solution you would like to see implemented

- [ ] Consider setting error-boundary https://www.npmjs.com/package/react-error-boundary - allow setting this at app level, but we should really output as much data of the current user as possible, e.g. in Query: the current query, in Studio: the current entities (we can download them to a file for people)
- [ ] We should expose critical stores like `QueryEditorStore` or `EditorStore` in `window` object (via something like `ApplicationStore.debugService` (note that we need to test if the methods of these object gets obfuscated by bundler's uglifier or not)

### Describe alternatives you have considered

_No response_

### Documentation, Design, Adoption, Migration Strategy

_No response_

### Contribution

- [ ] I would like to work on this feature

Contributor guide

Open the contributing guide

Research direction

Start by reading the app-level error handling entry points and the mentioned QueryEditorStore, EditorStore, and ApplicationStore.debugService. Compare how Query and Studio currently hold the current query or entities, then define a concrete recovery strategy and acceptance criteria for preserving that data after an unhandled error.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.