1
0
Fork 0

more debug info

pull/1591/head
Rob Herley 2023-12-01 03:04:10 +00:00 committed by GitHub
parent 4789a46578
commit 57db7a6302
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -54,7 +54,7 @@ class ArtifactHttpClient implements Rpc {
data: object | Uint8Array data: object | Uint8Array
): Promise<object | Uint8Array> { ): Promise<object | Uint8Array> {
const url = new URL(`/twirp/${service}/${method}`, this.baseUrl).href const url = new URL(`/twirp/${service}/${method}`, this.baseUrl).href
debug(`Requesting: ${url}`) debug(`[Request] ${method} ${url}`)
const headers = { const headers = {
'Content-Type': contentType 'Content-Type': contentType
} }
@ -80,6 +80,8 @@ class ArtifactHttpClient implements Rpc {
try { try {
const response = await operation() const response = await operation()
const statusCode = response.message.statusCode const statusCode = response.message.statusCode
debug(`[Response] ${response.message.statusCode}`)
debug(JSON.stringify(response.message.headers, null, 2))
if (this.isSuccessStatusCode(statusCode)) { if (this.isSuccessStatusCode(statusCode)) {
return response return response