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

Show error message correctly on workflow save #1046

Merged
merged 1 commit into from
Oct 24, 2024

Conversation

wintonzheng
Copy link
Contributor

@wintonzheng wintonzheng commented Oct 24, 2024

Important

Improve error message display in FlowRenderer.tsx by using detail from error response if available.

  • Behavior:
    • In FlowRenderer.tsx, update onError in saveWorkflowMutation to display detail from error response if available, otherwise use error.message.
  • Misc:
    • No other files or functions are affected.

This description was created by Ellipsis for cecb89a. It will automatically update as commits are pushed.

…src/'

<!-- ELLIPSIS_HIDDEN -->

> [!IMPORTANT]
> Improve error message display in `FlowRenderer.tsx` by using `detail` from error response if available.
>
>   - **Behavior**:
>     - In `FlowRenderer.tsx`, update `onError` in `saveWorkflowMutation` to display `detail` from error response if available, otherwise use `error.message`.
>   - **Misc**:
>     - No other files or functions are affected.
>
> <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=Skyvern-AI%2Fskyvern-cloud&utm_source=github&utm_medium=referral)<sup> for 89ad2066d47ab1255fbb073dae1871e9379a14a6. It will automatically update as commits are pushed.</sup>

<!-- ELLIPSIS_HIDDEN -->
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Incremental review on cecb89a in 9 seconds

More details
  • Looked at 16 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. skyvern-frontend/src/routes/workflows/editor/FlowRenderer.tsx:222
  • Draft comment:
    Ensure that error.response?.data is always an object before accessing detail to avoid potential runtime errors. Consider using a type guard or defaulting to an empty object.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The PR description indicates that the error message should use detail if available, otherwise error.message. The implementation correctly checks for detail and uses it if present.

Workflow ID: wflow_Oe1GPrhZndygH5LV


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Reviewed everything up to cecb89a in 9 seconds

More details
  • Looked at 16 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. skyvern-frontend/src/routes/workflows/editor/FlowRenderer.tsx:222
  • Draft comment:
    Consider using a type guard or a more specific type assertion to ensure 'detail' is safely accessed. This can prevent runtime errors if the structure of 'error.response?.data' changes.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The code correctly checks for the presence of 'detail' in the error response and uses it if available. However, the type assertion could be improved for better type safety.

Workflow ID: wflow_Bnxjt4hINo41qWnj


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@msalihaltun msalihaltun merged commit afae80f into main Oct 24, 2024
2 checks passed
@msalihaltun msalihaltun deleted the salih/show-error-detail branch October 24, 2024 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants