Description
If a user imports a settings backup file that has syntactically invalid JSON structure, the JSON.parse call in main.js throws an unhandled exception. This returns a raw syntax error exception string to the settings page instead of a user-friendly error banner.
Steps to Reproduce
- Create a backup JSON file and introduce a syntax error (e.g., leave a trailing comma or omit a closing brace).
- Click "Import Settings Backup" and select the malformed file.
- Observe the error toast displaying raw Node.js parsing exception messages (e.g.,
Unexpected token } in JSON...).
Expected Behaviour
The import handler should catch JSON parsing errors specifically and return a friendly error message indicating that the backup file is corrupt or malformed.
Actual Behaviour
Raw JavaScript/Node.js stack traces and parser exceptions are bubbled directly to the UI.
Description
If a user imports a settings backup file that has syntactically invalid JSON structure, the
JSON.parsecall inmain.jsthrows an unhandled exception. This returns a raw syntax error exception string to the settings page instead of a user-friendly error banner.Steps to Reproduce
Unexpected token } in JSON...).Expected Behaviour
The import handler should catch JSON parsing errors specifically and return a friendly error message indicating that the backup file is corrupt or malformed.
Actual Behaviour
Raw JavaScript/Node.js stack traces and parser exceptions are bubbled directly to the UI.