From 3bfb814e227b5a4e099f5be7f92b4eb3df61aa23 Mon Sep 17 00:00:00 2001 From: Simon Ouellet Date: Tue, 17 Oct 2023 10:43:51 -0400 Subject: [PATCH] Update errors.py Currently, when we mosaic some distant rasters in a large area, leaflet raises a 404 error in the console for every missing tile. Changing from 404 to 204 seems to fix the problem --- src/titiler/mosaic/titiler/mosaic/errors.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/titiler/mosaic/titiler/mosaic/errors.py b/src/titiler/mosaic/titiler/mosaic/errors.py index 12cbc28e0..284785be8 100644 --- a/src/titiler/mosaic/titiler/mosaic/errors.py +++ b/src/titiler/mosaic/titiler/mosaic/errors.py @@ -11,8 +11,8 @@ MOSAIC_STATUS_CODES = { MosaicAuthError: status.HTTP_401_UNAUTHORIZED, - EmptyMosaicError: status.HTTP_404_NOT_FOUND, + EmptyMosaicError: status.HTTP_204_NO_CONTENT, MosaicNotFoundError: status.HTTP_404_NOT_FOUND, - NoAssetFoundError: status.HTTP_404_NOT_FOUND, + NoAssetFoundError: status.HTTP_204_NO_CONTENT, MosaicError: status.HTTP_424_FAILED_DEPENDENCY, }