fix(custom-widgets): prevent editor crash on invalid v2 request manifest
The customJsx v2 serialize path called parseRequestManifest which threw on invalid JSON during React render (via getInput on every keystroke), crashing the page with Next.js 'Unexpected error' because the form had no error boundary. - Make parseRequestManifest defensive (try/catch -> empty array) - Wrap CustomWidgetForm in FormErrorBoundary (defense-in-depth) - Add unit tests for invalid manifest inputs
This commit is contained in:
1 parent
67d146220a
commit
9c31cdce37
6 files changed
+102
-19
No files matched your search
@@ -803,6 +803,10 @@
|
||||
"editor": {
|
||||
"saveBlocked": "Resolve the editor errors before saving.",
|
||||
"saveReady": "The configuration is ready to save.",
|
||||
"errorBoundary": {
|
||||
"title": "Something went wrong",
|
||||
"retry": "Try again"
|
||||
},
|
||||
"language": {
|
||||
"jsx": "JSX",
|
||||
"json": "JSON"
|
||||
@@ -4084,6 +4088,7 @@
|
||||
},
|
||||
"noDefinition": "No definition selected",
|
||||
"definitionNotFound": "Widget definition not found. It may have been deleted.",
|
||||
"editModePending": "Save the board to load this widget.",
|
||||
"noDisplayOutput": "No display output",
|
||||
"openJson": "Open in browser JSON viewer",
|
||||
"execute": "Execute",
|
||||
|
||||
Reference in new issue
Block a user