@@ -92,7 +92,7 @@ export class Store {
9292 const res = await this . client . makeRequest ( { key, method : HTTPMethod . DELETE , storeName : this . name } )
9393
9494 if ( ! [ 200 , 204 , 404 ] . includes ( res . status ) ) {
95- throw new BlobsInternalError ( res . status )
95+ throw new BlobsInternalError ( res )
9696 }
9797 }
9898
@@ -116,7 +116,7 @@ export class Store {
116116 }
117117
118118 if ( res . status !== 200 ) {
119- throw new BlobsInternalError ( res . status )
119+ throw new BlobsInternalError ( res )
120120 }
121121
122122 if ( type === undefined || type === 'text' ) {
@@ -139,7 +139,7 @@ export class Store {
139139 return res . body
140140 }
141141
142- throw new BlobsInternalError ( res . status )
142+ throw new BlobsInternalError ( res )
143143 }
144144
145145 async getMetadata ( key : string , { consistency } : { consistency ?: ConsistencyMode } = { } ) {
@@ -150,7 +150,7 @@ export class Store {
150150 }
151151
152152 if ( res . status !== 200 && res . status !== 304 ) {
153- throw new BlobsInternalError ( res . status )
153+ throw new BlobsInternalError ( res )
154154 }
155155
156156 const etag = res ?. headers . get ( 'etag' ) ?? undefined
@@ -221,7 +221,7 @@ export class Store {
221221 }
222222
223223 if ( res . status !== 200 && res . status !== 304 ) {
224- throw new BlobsInternalError ( res . status )
224+ throw new BlobsInternalError ( res )
225225 }
226226
227227 const responseETag = res ?. headers . get ( 'etag' ) ?? undefined
@@ -293,7 +293,7 @@ export class Store {
293293 } )
294294
295295 if ( res . status !== 200 ) {
296- throw new BlobsInternalError ( res . status )
296+ throw new BlobsInternalError ( res )
297297 }
298298 }
299299
@@ -315,7 +315,7 @@ export class Store {
315315 } )
316316
317317 if ( res . status !== 200 ) {
318- throw new BlobsInternalError ( res . status )
318+ throw new BlobsInternalError ( res )
319319 }
320320 }
321321
0 commit comments