Skip to content

refactor: use custom NotFoundError when session is not found, instead of ValueError #1384

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

Conversation

Tobias-Freire
Copy link

What was done

  • Substitute ValueError for NotFoundError when session not found in adk-python/src/google/adk/runners.py
  • Adjust unit tests substituting ValueError for NotFoundError in apropriated parts of code in adk-python/tests/unittests/sessions/test_vertex_ai_session_service.py

Motivation

Improves code readability and maintainability.

Issue

Closes #1383

@DeanChensj
Copy link
Collaborator

Hi @Tobias-Freire , could you resolve the conflict for this PR?

@DeanChensj DeanChensj self-assigned this Jul 30, 2025
@DeanChensj DeanChensj added the wip [Status] This issue is being worked on. Either there is a pending PR or is planned to be fixed label Jul 30, 2025
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit. the test and your change are actually irrelevant.

@Tobias-Freire Tobias-Freire closed this by deleting the head repository Aug 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wip [Status] This issue is being worked on. Either there is a pending PR or is planned to be fixed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use NotFoundError instead of ValueError when session not found
4 participants