Skip to content

Commit

Permalink
raise proper error class
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeh committed Mar 2, 2023
1 parent bba80cc commit 2fff34a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tiler/app/middlewares/url_injector.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def s3_presigned_access(url: str | None = Query(default=None, description="Optio
"""
if not url:
if not default_cog:
raise Exception("DEFAULT_COG env var is not set. It is required if no URL is passed to the tiler")
raise ValueError("DEFAULT_COG env var is not set. It is required if no URL is passed to the tiler")
url = default_cog
presigned_url = s3.generate_presigned_url(
'get_object',
Expand Down

0 comments on commit 2fff34a

Please sign in to comment.