Error handling in agent service connected with Open Api tool #161
Unanswered
lukaszkiszka
asked this question in
Get Help
Replies: 1 comment 1 reply
-
|
hey @lukaszkiszka thanks for the feedback. we are working to improve the error handling and surfacing on our side. is the OpenAPI spec issue resolved for you? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Technical Feedback
I have agent connected to API by Open Api tools and I have problem with handle api errors correctly.
When API returns error response (http status 4XX, 5XX) in payground I see error message like:

But when I call agent by SDK and error occurs then I not see error in SDK - agent returns in response the same message as I passed in input.
When API error occurs In thread log I not seen "run" object under "thread":

In this case I can not use agent instructions for force better response when error occurs. I think cause of this is that run in thread was broken.
Next problem is with error body response - in output from openapi tool I see only http code, I not see whole response body:
output: "content_type='system_error' name='AzureAgentToolUserError' text='HTTP error 404: Not Found'"Desired Outcome
Current Workaround
Create API, where return only HTTP status 200, and inside response use field status for control that response is correct or error.
Depend on field status returns one from fields: successResponse - only if response is correct, and errorResponse - only if response is error.
Beta Was this translation helpful? Give feedback.
All reactions