Fix redundant except clause: ValueError is subclass of Exception

except (ValueError, Exception) was redundant since ValueError
already inherits from Exception. Simplified all 3 occurrences in
the bbox resolution error handlers.
This commit is contained in:
Ryan Malloy 2026-02-18 18:15:41 -07:00
parent 31dff49351
commit c2d54e7d59

View File

@ -307,7 +307,7 @@ async def get_imagery(
try:
resolved_bbox = await _resolve_bbox(client, bbox, place)
except (ValueError, Exception) as exc:
except Exception as exc:
return [{"type": "text", "text": str(exc)}]
image_format = f"image/{format}"
@ -368,7 +368,7 @@ async def compare_dates(
try:
resolved_bbox = await _resolve_bbox(client, bbox, place)
except (ValueError, Exception) as exc:
except Exception as exc:
return [{"type": "text", "text": str(exc)}]
composite_bytes = await client.compare_dates(
@ -420,7 +420,7 @@ async def get_imagery_composite(
try:
resolved_bbox = await _resolve_bbox(client, bbox, place)
except (ValueError, Exception) as exc:
except Exception as exc:
return [{"type": "text", "text": str(exc)}]
image_bytes = await client.get_wms_composite(