-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Description
I am encountering an issue with my agent deployed to Vertex AI Agent Engine
and integrated with Gemini Enterprise. When the agent exceeds the token
limit, it does not show any response. I would like to either display a
custom message or a standard system exception when this occurs.
I need assistance with implementing error handling to catch the 400
INVALID_ARGUMENT error that occurs when the token limit is exceeded. I want
to display a user-friendly message, such as "Your request exceeded the
maximum allowed token limit. Please try a shorter input," or show a
standard system exception.
I have provided my agent code and need guidance on how to incorporate the
error handling logic to address this issue.
I have tested various exception-handling methods, but the system continues to default to a generic 'Something went wrong' error screen (see attached). Ideally, the chat window should surface a user-friendly message specific to the error encountered. This appears to be a defect in the product's ability to render exception details to the end user.