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 #1369: Chains Allow Empty Names #1377

Merged
merged 1 commit into from
Jan 19, 2025
Merged

Fix #1369: Chains Allow Empty Names #1377

merged 1 commit into from
Jan 19, 2025

Conversation

Josh-XT
Copy link
Owner

@Josh-XT Josh-XT commented Jan 19, 2025

Fix #1369: Chains Allow Empty Names

This pull request focuses on adding validation checks to ensure that the chain_name parameter is not empty in various endpoint functions within the agixt/endpoints/Chain.py file. Each affected function now raises an HTTPException with a status code of 400 if the chain_name is empty, improving the robustness and reliability of the code.

Validation improvements:

  • Added a check to raise an HTTPException if chain_name is empty in the get_chain function.
  • Added a check to raise an HTTPException if chain_name is empty in the run_chain function.
  • Added a check to raise an HTTPException if chain_name is empty in the run_chain_step function.
  • Added a check to raise an HTTPException if chain_name is empty in the get_chain_args function.
  • Added a check to raise an HTTPException if chain_name is empty in the add_chain function.
  • Added a check to raise an HTTPException if chain_name is empty in the importchain function.
  • Added a check to raise an HTTPException if chain_name is empty in the rename_chain function.
  • Added a check to raise an HTTPException if chain_name is empty in the delete_chain function.
  • Added a check to raise an HTTPException if chain_name is empty in the add_step function.
  • Added a check to raise an HTTPException if chain_name is empty in the update_step function.
  • Added a check to raise an HTTPException if chain_name is empty in the move_step function.
  • Added a check to raise an HTTPException if chain_name is empty in the delete_step function.

@Josh-XT Josh-XT marked this pull request as ready for review January 19, 2025 01:05
@Josh-XT Josh-XT merged commit 6aa959b into main Jan 19, 2025
7 checks passed
@Josh-XT Josh-XT deleted the fix-1369 branch January 19, 2025 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Chains Allow Empty Names
1 participant