catch errors at the root, remove unneccessary disabled rule

This commit is contained in:
Bethany
2023-08-09 12:08:43 -07:00
parent e8fb71c4bb
commit b851b70474
4 changed files with 29 additions and 68 deletions

View File

@@ -56,8 +56,6 @@ class ArtifactHttpClient implements Rpc {
const headers = {
'Content-Type': contentType
}
info(`Making request to ${url} with data: ${JSON.stringify(data)}`)
try {
const response = await this.retryableRequest(async () =>
this.httpClient.post(url, JSON.stringify(data), headers)
@@ -65,7 +63,7 @@ class ArtifactHttpClient implements Rpc {
const body = await response.readBody()
return JSON.parse(body)
} catch (error) {
throw new Error(error.message)
throw new Error(`Failed to ${method}: ${error.message}`)
}
}