Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion packages/server/lib/cloud/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import { isNonRetriableCertErrorCode } from '../network/non_retriable_cert_error

const debug = debugModule('cypress:server:cloud:api')
const debugProtocol = debugModule('cypress:server:protocol')
const debugVerbose = debugModule('cypress-verbose:server:cloud:api')

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

return debug('response %o', resp)
debug(`${params.method} ${params.url}: ${resp ? `${resp.status} ${resp.statusText}` : 'empty response'}`)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Incorrect Response Property Access

The debug statement attempts to log resp.status and resp.statusText. The request-promise library uses statusCode and statusMessage for response properties. Also, resolveWithFullResponse isn't enabled, so resp often contains only the response body. This results in undefined values being logged instead of the actual HTTP status.

Fix in Cursor Fix in Web

debugVerbose('response headers: %o', resp ? resp.headers : 'no headers')
debugVerbose('body:', resp ? resp.body : 'no body')
})
})

Expand Down
Loading