From 8a3eb61c7597a8e81a61ee68625cb4e36e6ef6cb Mon Sep 17 00:00:00 2001 From: alexeh Date: Wed, 1 Mar 2023 09:47:58 +0300 Subject: [PATCH] raise proper error class --- tiler/app/middlewares/url_injector.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tiler/app/middlewares/url_injector.py b/tiler/app/middlewares/url_injector.py index e9b3f9f42..6f8886b03 100644 --- a/tiler/app/middlewares/url_injector.py +++ b/tiler/app/middlewares/url_injector.py @@ -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',