Skip to content

Commit cd9710b

Browse files
committed
Use a more describing exception
1 parent f7c2d89 commit cd9710b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

xarray_ecmwf/client_polytope.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,7 @@ def download(self, result: Any, target: str | None = None) -> str:
3838
result.download(output_file=target)
3939
if os.stat(target).st_size == 0:
4040
request = result.describe()["user_request"]
41-
raise TypeError(f"polytope returned an empty file: {target} for {request}")
41+
raise RuntimeError(
42+
f"polytope returned an empty file: {target} for {request}"
43+
)
4244
return target

0 commit comments

Comments
 (0)