Skip to content

Commit

Permalink
Merge pull request #115 from metno/fix-issue
Browse files Browse the repository at this point in the history
Fix not raising filenotfounderror in overlay endpoint
  • Loading branch information
thorbjoernl authored Jan 22, 2025
2 parents 519301d + c7f4c5b commit bf3d26e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/aerovaldb/jsondb/jsonfiledb.py
Original file line number Diff line number Diff line change
Expand Up @@ -777,6 +777,10 @@ async def get_map_overlay(
file_path += ext
if os.path.exists(file_path):
break
else:
raise FileNotFoundError(
f"Overlay for {project}/{experiment}/{source}/{variable}/{date} does not exist."
)

logger.debug(f"Fetching image with path '{file_path}'")

Expand Down

0 comments on commit bf3d26e

Please sign in to comment.