@milaboratories/pl-drivers 1.5.13 → 1.5.15

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/index.mjs CHANGED
@@ -834,17 +834,22 @@ class Gt {
834
834
  a
835
835
  ), c = await Vt(o, i.chunkStart, i.chunkEnd);
836
836
  await Jt(o, n);
837
- const {
838
- body: l,
839
- statusCode: p,
840
- headers: J
841
- } = await Ne(i.uploadUrl, {
842
- dispatcher: this.httpClient,
843
- body: c,
844
- headers: We(i.headers),
845
- method: i.method.toUpperCase()
846
- }), nt = await l.text();
847
- Zt(p, nt, J, i), await this.grpcUpdateProgress({ id: e, type: t }, i.chunkEnd - i.chunkStart, a);
837
+ try {
838
+ const {
839
+ body: l,
840
+ statusCode: p,
841
+ headers: J
842
+ } = await Ne(i.uploadUrl, {
843
+ dispatcher: this.httpClient,
844
+ body: c,
845
+ headers: We(i.headers),
846
+ method: i.method.toUpperCase()
847
+ }), nt = await l.text();
848
+ Zt(p, nt, J, i);
849
+ } catch (l) {
850
+ throw new Error(`partUpload: error ${JSON.stringify(l)} happened while trying to do part upload to the url ${i.uploadUrl}, headers: ${JSON.stringify(i.headers)}`);
851
+ }
852
+ await this.grpcUpdateProgress({ id: e, type: t }, i.chunkEnd - i.chunkStart, a);
848
853
  }
849
854
  async finalize(e, t) {
850
855
  return await this.grpcFinalize(e, t);