Skip to content

Chaos Studio crashes on invalid YAML syntax #5404

@shovan-mondal

Description

@shovan-mondal

What happened:
When editing an experiment in the Chaos Studio YAML view, typing invalid syntax (e.g., incomplete lines or malformed structure) causes the entire application to crash with an "Uncaught runtime error". The user sees a white screen or error overlay and cannot recover their work.

What you expected to happen:
The editor should handle parsing errors gracefully. Instead of crashing, it should:

  1. Catch the YAML validation error.
  2. Display a helpful error message to the user.
  3. Disable the "Save" button until the syntax is corrected.

Where can this issue be corrected?
src/views/ExperimentYAMLBuilder/ExperimentYAMLBuilder.tsx and related YAML utility services.

How to reproduce it:

  1. Go to Chaos Studio.
  2. Select an experiment and switch to YAML mode.
  3. Delete a character to break the syntax (e.g., remove a character from the name of your).
  4. Observe the immediate application crash.

For example:
In the spec: templates: I changed the name from minikube-agent to minikube-agent-

Image

Due to addition of one character (-) it crashes like this:

Image

Anything else we need to know?:
I have already implemented a fix that introduces a dedicated "Error Console" to display validation issues without crashing the UI.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions