Skip to content

Commit ae9abad

Browse files
committed
fix: hmacKey fix
1 parent 70a0132 commit ae9abad

7 files changed

Lines changed: 125 additions & 119 deletions

File tree

handwritten/storage/src/file.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3307,11 +3307,10 @@ class File extends ServiceObject<File, FileMetadata> {
33073307
cb(null, false);
33083308
return;
33093309
}
3310-
33113310
cb(err);
33123311
},
33133312
)
3314-
.catch(err => callback!(err));
3313+
.catch(err => cb(err));
33153314
}
33163315

33173316
makePrivate(

handwritten/storage/src/hmacKey.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ export class HmacKey extends ServiceObject<HmacKey, HmacKeyMetadata> {
354354
storageTransport: storage.storageTransport,
355355
parent: storage,
356356
id: accessId,
357-
baseUrl: `/projects/${projectId}/hmacKeys`,
357+
baseUrl: `/storage/v1/projects/${projectId}/hmacKeys`,
358358
methods,
359359
});
360360

handwritten/storage/src/resumable-upload.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1208,6 +1208,8 @@ export class Upload extends Writable {
12081208
code: resp.status.toString(),
12091209
message: resp.statusText,
12101210
name: resp.statusText,
1211+
config: resp.config,
1212+
response: resp,
12111213
} as GaxiosError)
12121214
) {
12131215
void this.attemptDelayedRetry(resp);

handwritten/storage/src/storage.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1224,7 +1224,7 @@ export class Storage {
12241224
.makeRequest<HmacKeyResourceResponse>(
12251225
{
12261226
method: 'POST',
1227-
url: `/projects/${projectId}/hmacKeys`,
1227+
url: `/storage/v1/projects/${projectId}/hmacKeys`,
12281228
queryParameters: query as unknown as StorageQueryParameters,
12291229
retry: false,
12301230
responseType: 'json',
@@ -1488,7 +1488,7 @@ export class Storage {
14881488
items: HmacKeyMetadata[];
14891489
}>(
14901490
{
1491-
url: `/projects/${projectId}/hmacKeys`,
1491+
url: `/storage/v1/projects/${projectId}/hmacKeys`,
14921492
responseType: 'json',
14931493
queryParameters: query as unknown as StorageQueryParameters,
14941494
method: 'GET',

handwritten/storage/system-test/kitchen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ describe('resumable-upload', () => {
9999
// see: https://cloud.google.com/storage/docs/exponential-backoff:
100100
const ms = Math.pow(2, retries) * 1000 + Math.random() * 2000;
101101
console.info(`retrying "${title}" in ${ms}ms`);
102-
setTimeout(() => done, ms);
102+
setTimeout(() => done(), ms);
103103
}
104104

105105
it('should work', done => {

0 commit comments

Comments
 (0)