Skip to content

Commit 44f07d9

Browse files
committed
feedback
1 parent 96abe23 commit 44f07d9

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

packages/core/src/lambda/vue/remoteInvoke/invokeLambda.ts

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ export class RemoteInvokeWebview extends VueWebview {
451451
errorMessage.includes('lambda-testevent-schemas registry not found') ||
452452
errorMessage.includes('There are no saved events')
453453
) {
454-
getLogger().debug('No remote test events found for function (this is normal): %s', functionArn)
454+
getLogger().debug('No remote test events found for function: %s', functionArn)
455455
return []
456456
}
457457
// Re-throw other errors
@@ -486,7 +486,7 @@ export class RemoteInvokeWebview extends VueWebview {
486486

487487
const selected = await vscode.window.showQuickPick(events, {
488488
placeHolder: localize('AWS.lambda.remoteInvoke.selectRemoteEvent', 'Select a remote test event'),
489-
title: localize('AWS.lambda.remoteInvoke.loadRemoteEvent', 'Load Remote Event'),
489+
title: localize('AWS.lambda.remoteInvoke.loadRemoteEvent', 'Load Remote Test Event'),
490490
})
491491

492492
if (selected) {
@@ -571,15 +571,17 @@ export class RemoteInvokeWebview extends VueWebview {
571571
}
572572

573573
if (eventName) {
574-
const eventData = {
574+
// Use force flag when overwriting existing events
575+
const isOverwriting = selected !== createNewOption
576+
const params: SamCliRemoteTestEventsParameters = {
577+
functionArn: functionArn,
578+
operation: TestEventsOperation.Put,
575579
name: eventName,
576-
event: eventContent,
580+
eventSample: eventContent,
577581
region: region,
578-
arn: functionArn,
582+
force: isOverwriting,
579583
}
580-
// Use force flag when overwriting existing events
581-
const isOverwriting = selected !== createNewOption
582-
await this.createRemoteTestEvents(eventData, isOverwriting)
584+
await this.remoteTestEvents(params)
583585
return eventName
584586
}
585587

0 commit comments

Comments
 (0)