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

Put a guard in workflow save error detail #1326

Merged

Conversation

wintonzheng
Copy link
Contributor

@wintonzheng wintonzheng commented Dec 5, 2024

Important

Add optional chaining to detail access in FlowRenderer to prevent runtime errors when error.response?.data is undefined.

  • Error Handling:
    • Add optional chaining to detail access in onError callback in FlowRenderer to prevent runtime errors when error.response?.data is undefined.

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

…src/'

<!-- ELLIPSIS_HIDDEN -->

> [!IMPORTANT]
> Add optional chaining to safely access `detail` in error handling in `FlowRenderer`.
>
>   - **Error Handling**:
>     - Add optional chaining to `detail` access in `onError` callback in `FlowRenderer` to prevent runtime errors when `error.response?.data` is undefined.
>
> <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 e48ebee50af5353d898fbf5f7381acb13bc315a9. 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! Reviewed everything up to 9b3f056 in 9 seconds

More details
  • Looked at 13 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:255
  • Draft comment:
    The use of optional chaining here is appropriate to prevent runtime errors when error.response?.data is undefined. This change aligns with the PR's intent.
  • Reason this comment was not posted:
    Confidence changes required: 0%
    The change made in the PR is correct and aligns with the intent to prevent runtime errors when error.response?.data is undefined. The use of optional chaining is appropriate here.

Workflow ID: wflow_2wYhO0fUdm5R34gy


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! Incremental review on 9b3f056 in 8 seconds

More details
  • Looked at 13 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:255
  • Draft comment:
    The use of optional chaining here is appropriate to prevent runtime errors when 'error.response?.data' is undefined.
  • Reason this comment was not posted:
    Confidence changes required: 0%
    The change made in the PR is correct and aligns with the intent to prevent runtime errors when accessing 'detail'.

Workflow ID: wflow_fNvCwiHTOMr5fi2P


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

@msalihaltun msalihaltun merged commit b99094a into main Dec 5, 2024
2 checks passed
@msalihaltun msalihaltun deleted the salih/put-guard-clause-in-workflow-save-error-detail branch December 5, 2024 16:41
satansdeer pushed a commit to satansdeer/skyvern that referenced this pull request Dec 12, 2024
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