more debug info

This commit is contained in:
Rob Herley authored and GitHub committed 2023-12-01 03:04:10 +00:00
1 parent 3a5b84efa6
commit fc051fc5d6
1 file changed
+3 -1
+3 -1
View File
@@ -54,7 +54,7 @@ class ArtifactHttpClient implements Rpc {
data: object | Uint8Array
): Promise<object | Uint8Array> {
const url = new URL(`/twirp/${service}/${method}`, this.baseUrl).href
debug(`Requesting: ${url}`)
debug(`[Request] ${method} ${url}`)
const headers = {
'Content-Type': contentType
}
@@ -80,6 +80,8 @@ class ArtifactHttpClient implements Rpc {
try {
const response = await operation()
const statusCode = response.message.statusCode
debug(`[Response] ${response.message.statusCode}`)
debug(JSON.stringify(response.message.headers, null, 2))
if (this.isSuccessStatusCode(statusCode)) {
return response