Skip to content

Commit

Permalink
fix(frontend): Unbreak save button after save error (#9290)
Browse files Browse the repository at this point in the history
- Resolves #9253

### Changes πŸ—οΈ

- Update state when an error occurs on save, to re-enable the save
button

### Checklist πŸ“‹

#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] I have tested my changes according to the test plan:
- Try to save an agent with missing required fields -> should give an
error
  - Fill out the required fields and try saving again -> should work
  • Loading branch information
Pwuts authored Jan 17, 2025
1 parent c61317e commit 0d2bb46
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions autogpt_platform/frontend/src/hooks/useAgentGraph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,7 @@ export default function useAgentGraph(
title: "Error saving agent",
description: errorMessage,
});
setSaveRunRequest({ request: "save", state: "error" });
}
}, [_saveAgent, toast]);

Expand Down

0 comments on commit 0d2bb46

Please sign in to comment.