Skip to content

Commit 8d88dcd

Browse files
committed
chore: improve cloud api response logging
1 parent 3f45167 commit 8d88dcd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/server/lib/cloud/api/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ import { isNonRetriableCertErrorCode } from '../network/non_retriable_cert_error
4040

4141
const debug = debugModule('cypress:server:cloud:api')
4242
const debugProtocol = debugModule('cypress:server:protocol')
43+
const debugVerbose = debugModule('cypress-verbose:server:cloud:api')
4344

4445
const THIRTY_SECONDS = humanInterval('30 seconds')
4546
const SIXTY_SECONDS = humanInterval('60 seconds')
@@ -164,7 +165,9 @@ const rp = request.defaults((params: CypressRequestOptions, callback) => {
164165
cacheResponse(resp, params)
165166
}
166167

167-
return debug('response %o', resp)
168+
debug(`${params.method} ${params.url}: ${resp ? `${resp.status} ${resp.statusText}` : 'empty response'}`)
169+
debugVerbose('response headers: %o', resp ? resp.headers : 'no headers')
170+
debugVerbose('body:', resp ? resp.body : 'no body')
168171
})
169172
})
170173

0 commit comments

Comments
 (0)