Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ui): handle parsing errors properly in object editor #13931

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Nov 23, 2024

  1. fix(ui): handle parsing errors properly

    argoproj#13915 introduced a
    regression where edits made in an object editor that introduce syntax
    errors cause a full screen error. The editor uses the following
    `try-catch` block to handle parse errors, but the `catch` block no
    longer works because the parsing logic was moved to `reducer()`, which
    is executed async:
    https://github.com/argoproj/argo-workflows/blob/main/ui/src/shared/components/object-editor.tsx#L117-L122
    
    This moves the parsing logic to the `setObject()` function, which means
    errors are now propagated to the caller.
    
    Tested by going http://localhost:8080/workflow-templates, creating a new
    `WorkflowTemplate`, and making edits.
    
    Signed-off-by: Mason Malone <[email protected]>
    MasonM committed Nov 23, 2024
    Configuration menu
    Copy the full SHA
    1a3d72e View commit details
    Browse the repository at this point in the history