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

Enhanced error message in create, delete agent #572

Merged
merged 2 commits into from
Oct 4, 2024

Conversation

JeevaRamanathan
Copy link
Contributor

@JeevaRamanathan JeevaRamanathan commented Oct 3, 2024

Related to #568

Enhanced HTTPException in create_agent.py and delete_agent.py.

As this issue states, we aim to improve error messages throughout the agents-api. I believe this issue can accommodate multiple pull requests. Your suggestions are highly appreciated.


Important

Enhanced error messages in create_agent.py and delete_agent.py for better clarity in HTTPException details.

  • Error Messages:
    • In create_agent.py, updated HTTPException detail to "Developer not found. Please ensure the provided auth token (which refers to your developer_id) is valid and the developer has the necessary permissions to create an agent."
    • In delete_agent.py, updated HTTPException detail to "The specified developer does not own the requested resource. Please verify the ownership or check if the developer ID is correct."

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

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 a085d41 in 9 seconds

More details
  • Looked at 29 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 drafted comments based on config settings.
1. agents-api/agents_api/models/agent/create_agent.py:33
  • Draft comment:
    The enhanced error message provides more context and guidance to the user, which aligns with the issue requirements. Ensure similar improvements are applied consistently across the codebase.
  • Reason this comment was not posted:
    Confidence changes required: 10%
    The error message improvements in both create_agent.py and delete_agent.py are consistent with the issue requirements. They provide more context and guidance to the user, which aligns with the objective of the issue.
2. agents-api/agents_api/models/agent/delete_agent.py:33
  • Draft comment:
    The enhanced error message provides more context and guidance to the user, which aligns with the issue requirements. Ensure similar improvements are applied consistently across the codebase.
  • Reason this comment was not posted:
    Confidence changes required: 10%
    The error message improvements in both create_agent.py and delete_agent.py are consistent with the issue requirements. They provide more context and guidance to the user, which aligns with the objective of the issue.

Workflow ID: wflow_YjqlXcj3z00JvZTR


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

creatorrr added a commit that referenced this pull request Oct 4, 2024
This PR is to fix the issue mentioned in #572  
I have made the required changes in the files create_agent.py,
create_or_update_agent.py and delete_agent.py. I have added descriptions
to QueryException, ValidationError and TypeError.
<!-- ELLIPSIS_HIDDEN -->

----

> [!IMPORTANT]
> Enhanced error messages for exceptions in agent-related files to
provide detailed guidance on potential issues.
> 
>   - **Error Messages**:
> - Enhanced error messages for `QueryException`, `ValidationError`, and
`TypeError` in `create_agent.py`, `create_or_update_agent.py`, and
`delete_agent.py`.
> - `QueryException`: Now includes a detailed message about potential
causes related to database query failures.
> - `ValidationError`: Provides guidance on checking input data for
missing or incorrect fields.
> - `TypeError`: Describes type mismatch issues and suggests reviewing
input data types.
> 
> <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=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup>
for 049d7ee. It will automatically
update as commits are pushed.</sup>

<!-- ELLIPSIS_HIDDEN -->

Co-authored-by: Diwank Singh Tomer <[email protected]>
@creatorrr creatorrr merged commit 06813fb into julep-ai:dev Oct 4, 2024
2 of 4 checks passed
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.

2 participants