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

feat(platform): Toast Graph Creation Error #8536

Merged
merged 5 commits into from
Nov 5, 2024

Conversation

majdyz
Copy link
Contributor

@majdyz majdyz commented Nov 4, 2024

Background

Graph Creation (and probably other API) can introduce user error.
The scope of this change is propagating those errors.

Changes 🏗️

image
  • Validate AgentInput & AgentOutput on any save action (not only only execution)
  • Handle ValueError as 400 instead of 500.
  • Fix CORS issue on rest_api & ws_api caused by header not being propagated on HTTP error responses.
  • Toast graph creation error response to the user.
  • Removed special handling for Input & Output block UI.

Testing 🔍

Note

Only for the new autogpt platform, currently in autogpt_platform/

  • Create from scratch and execute an agent with at least 3 blocks
  • Import an agent from file upload, and confirm it executes correctly
  • Upload agent to marketplace
  • Import an agent from marketplace and confirm it executes correctly
  • Edit an agent from monitor, and confirm it executes correctly

Configuration Changes 📝

Note

Only for the new autogpt platform, currently in autogpt_platform/

If you're making configuration or infrastructure changes, please remember to check you've updated the related infrastructure code in the autogpt_platform/infra folder.

Examples of such changes might include:

  • Changing ports
  • Adding new services that need to communicate with each other
  • Secrets or environment variable changes
  • New or infrastructure changes such as databases

@majdyz majdyz requested review from ntindle, Swiftyos and Pwuts November 4, 2024 14:03
@majdyz majdyz requested a review from a team as a code owner November 4, 2024 14:03
@github-actions github-actions bot added platform/frontend AutoGPT Platform - Front end platform/backend AutoGPT Platform - Back end labels Nov 4, 2024
Copy link

qodo-merge-pro bot commented Nov 4, 2024

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Logic Change
The validation logic for required inputs has been modified. Verify that this change doesn't introduce unintended side effects or break existing functionality.

Error Handling
New error handling logic has been introduced. Ensure that it correctly handles all expected error scenarios and provides appropriate responses.

Error Handling
New error handling and toast notification have been added to the saveAgent function. Verify that errors are properly caught and displayed to the user.

@github-actions github-actions bot added the size/l label Nov 4, 2024
@majdyz majdyz changed the title feat(error): Toast Graph Creation Error feat(platform): Toast Graph Creation Error Nov 4, 2024
@ntindle
Copy link
Member

ntindle commented Nov 5, 2024

works
image

@ntindle ntindle enabled auto-merge (squash) November 5, 2024 03:12
@ntindle ntindle merged commit 45fe26b into dev Nov 5, 2024
10 checks passed
@ntindle ntindle deleted the zamilmajdy/add-error-create-failure branch November 5, 2024 03:23
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