1
0
Fork 0
pull/1596/head
Rob Herley 2023-12-06 23:57:33 +00:00 committed by GitHub
parent 8c317a0e59
commit f732e4cd62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -62,7 +62,7 @@ class ArtifactHttpClient implements Rpc {
const {body} = await this.retryableRequest(async () =>
this.httpClient.post(url, JSON.stringify(data), headers)
)
return JSON.parse(body)
} catch (error) {
throw new Error(`Failed to ${method}: ${error.message}`)
@ -71,7 +71,7 @@ class ArtifactHttpClient implements Rpc {
async retryableRequest(
operation: () => Promise<HttpClientResponse>
): Promise<{response: HttpClientResponse, body: string}> {
): Promise<{response: HttpClientResponse; body: string}> {
let attempt = 0
let errorMessage = ''
while (attempt < this.maxAttempts) {