-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Description of the issue
In several places in the codebase, we log missing records using logger.exception() like so:
logger.exception("No result found for %s", spec.value)
This creates a log that looks like an application failure, even though in some contexts — such as when querying for an optional resource — this is expected behavior.
For example:
script_object = self._script_repo.find_one(ScriptSpecification().by_script_hash(script_hash))
if script_object is None:
script_object = Script(script=script, script_hash=hash_script(script))
return script_objectIn this case, a None result is normal and handled gracefully, but the log still appears as an exception and may be confusing to a reader.
Suggestion
We should downgrade the logging level for this pattern where missing results are expected. Options include:
This may also effect other methods, but this one creates a lot of noise in cycle as it triggers everytime a new job / run is created
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels