mirror of https://github.com/actions/toolkit
one too many parses
parent
715b1acc05
commit
8c317a0e59
|
@ -80,11 +80,10 @@ class ArtifactHttpClient implements Rpc {
|
||||||
try {
|
try {
|
||||||
const response = await operation()
|
const response = await operation()
|
||||||
const statusCode = response.message.statusCode
|
const statusCode = response.message.statusCode
|
||||||
const raw = await response.readBody()
|
const body = await response.readBody()
|
||||||
const body = JSON.parse(raw)
|
|
||||||
debug(`[Response] - ${response.message.statusCode}`)
|
debug(`[Response] - ${response.message.statusCode}`)
|
||||||
debug(`Headers: ${JSON.stringify(response.message.headers, null, 2)}`)
|
debug(`Headers: ${JSON.stringify(response.message.headers, null, 2)}`)
|
||||||
debug(`Body: ${JSON.stringify(body, null, 2)}`)
|
debug(`Body: ${body}`)
|
||||||
|
|
||||||
if (this.isSuccessStatusCode(statusCode)) {
|
if (this.isSuccessStatusCode(statusCode)) {
|
||||||
return {response, body}
|
return {response, body}
|
||||||
|
|
Loading…
Reference in New Issue