From 67dca041d59a104f719fa5b4c96c6c7236d98cb2 Mon Sep 17 00:00:00 2001 From: doublebyte Date: Fri, 19 Jun 2026 13:34:16 +0100 Subject: [PATCH 1/2] - check if 500 responses of the upstream tile server are originated by out of bounds --- pygeoapi/provider/mvt_proxy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pygeoapi/provider/mvt_proxy.py b/pygeoapi/provider/mvt_proxy.py index d5f1c1eb2..347234b55 100644 --- a/pygeoapi/provider/mvt_proxy.py +++ b/pygeoapi/provider/mvt_proxy.py @@ -176,7 +176,7 @@ def get_tiles(self, layer=None, tileset=None, else: resp = session.get(f'{base_url}/{layer}/{z}/{x}/{y}{url_query}') # noqa - if resp.status_code == 404: + if resp.status_code == 404 or resp.status_code == 500: if (self.is_in_limits(self.get_tilematrixset(tileset), z, x, y)): # noqa return None raise ProviderTileNotFoundError From 9c1edc02f48f26856e19f5dd29c368dd31372f7b Mon Sep 17 00:00:00 2001 From: doublebyte Date: Sat, 20 Jun 2026 12:13:35 +0100 Subject: [PATCH 2/2] - rewritten condition --- pygeoapi/provider/mvt_proxy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pygeoapi/provider/mvt_proxy.py b/pygeoapi/provider/mvt_proxy.py index 347234b55..79853a4c6 100644 --- a/pygeoapi/provider/mvt_proxy.py +++ b/pygeoapi/provider/mvt_proxy.py @@ -176,7 +176,7 @@ def get_tiles(self, layer=None, tileset=None, else: resp = session.get(f'{base_url}/{layer}/{z}/{x}/{y}{url_query}') # noqa - if resp.status_code == 404 or resp.status_code == 500: + if resp.status_code in [404, 500]: if (self.is_in_limits(self.get_tilematrixset(tileset), z, x, y)): # noqa return None raise ProviderTileNotFoundError