Skip to content

Commit

Permalink
fix: change error type for unknown zone
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelrince committed Dec 13, 2024
1 parent a1e4827 commit 1bf31bd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions ecologits/tracers/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,7 @@ def llm_impacts(

electricity_mix = electricity_mixes.find_electricity_mix(zone=electricity_mix_zone)
if electricity_mix is None:
error = ModelNotRegisteredError(message=f"Could not find electricity mix `{electricity_mix_zone}` in the "
f"ADEME database.")
error = ZoneNotRegisteredError(message=f"Could not find electricity mix for `{electricity_mix_zone}` zone.")
logger.warning_once(str(error))
return ImpactsOutput(errors=[error])

Expand Down

0 comments on commit 1bf31bd

Please sign in to comment.