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

Job: Return null on unknown tasks #2218

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

scolsen
Copy link
Contributor

@scolsen scolsen commented Feb 2, 2024

Return null when attempting to retrieve unknown tasks from a Job (instead of throwing an exception). Updates callers accordingly.

NOTE: Depends on #2214

Fixes #2216

This commit adds a specific exception type for the case in which a caller attempts to retrieve a task from a Job that does not contain a task with the designated ID.

Updates callsites to properly handle and log this exception (in all cases we just ignore the data).
Tracks whether or not we want to remove the use of exceptions here and use nullable values instead.
Return null when attempting to retrieve unknown tasks from a Job (instead of throwing an exception). Updates callers accordingly.

Fixes google#2216
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.

[Code health] Revisit use of Exceptions and Nullable Types
1 participant