windmill-client 1.502.2 → 1.503.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client.js +7 -2
- package/dist/core/OpenAPI.js +1 -1
- package/dist/types.gen.d.ts +1 -0
- package/package.json +1 -1
package/dist/client.js
CHANGED
|
@@ -691,13 +691,18 @@ function loadS3FileStream(s3object_1) {
|
|
|
691
691
|
}
|
|
692
692
|
const queryParams = new URLSearchParams(params);
|
|
693
693
|
// We use raw fetch here b/c OpenAPI generated client doesn't handle Blobs nicely
|
|
694
|
-
const
|
|
694
|
+
const response = yield fetch(`${index_2.OpenAPI.BASE}/w/${getWorkspace()}/job_helpers/download_s3_file?${queryParams}`, {
|
|
695
695
|
method: "GET",
|
|
696
696
|
headers: {
|
|
697
697
|
Authorization: `Bearer ${index_2.OpenAPI.TOKEN}`,
|
|
698
698
|
},
|
|
699
699
|
});
|
|
700
|
-
|
|
700
|
+
// Check if the response was successful
|
|
701
|
+
if (!response.ok) {
|
|
702
|
+
const errorText = yield response.text();
|
|
703
|
+
throw new Error(`Failed to load S3 file: ${response.status} ${response.statusText} - ${errorText}`);
|
|
704
|
+
}
|
|
705
|
+
return response.blob();
|
|
701
706
|
});
|
|
702
707
|
}
|
|
703
708
|
/**
|
package/dist/core/OpenAPI.js
CHANGED
package/dist/types.gen.d.ts
CHANGED