We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fe24cc9 commit 0f55ffdCopy full SHA for 0f55ffd
1 file changed
cli/kleinkram/core.py
@@ -116,7 +116,13 @@ def download_artifact(
116
kleinkram.api.file_transfer._get_filename_from_cd(headers.get("content-disposition")) or f"{execution_id}.tar.gz",
117
)
118
119
- total_length = int(headers.get("content-length", 0))
+ total_length_raw = headers.get("content-length")
120
+ if total_length_raw is None:
121
+ raise ValueError(
122
+ f"Cannot determine artifact size for execution {execution_id}: "
123
+ "the server did not return a content-length header."
124
+ )
125
+ total_length = int(total_length_raw)
126
127
filepath = Path(filename)
128
0 commit comments