Skip to content

Commit 297f88b

Browse files
authored
fix(codewhisperer): incomplete log message #3774
Problem: Log messages are missing useful info about the exception: 2023-08-24 17:32:05 [ERROR]: CodeWhisperer Invocation Exception : 2023-08-24 17:32:07 [ERROR]: CodeWhisperer Invocation Exception : 2023-08-24 17:32:09 [ERROR]: CodeWhisperer Invocation Exception : 2023-08-24 17:32:09 [ERROR]: CodeWhisperer Invocation Exception : Solution: Fix logger call.
1 parent 1ce79fb commit 297f88b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/codewhisperer/service/recommendationHandler.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,7 @@ export class RecommendationHandler {
240240
if (latency === 0) {
241241
latency = startTime !== 0 ? performance.now() - startTime : 0
242242
}
243-
getLogger().error('CodeWhisperer Invocation Exception : ', error)
244-
getLogger().verbose(`CodeWhisperer Invocation Exception : ${error}`)
243+
getLogger().error('CodeWhisperer Invocation Exception : %s', (error as Error).message)
245244
if (isAwsError(error)) {
246245
this.errorMessagePrompt = error.message
247246
requestId = error.requestId || ''

0 commit comments

Comments
 (0)