Skip to content

Commit 98de99e

Browse files
author
Keegan Irby
committed
Remove wrapping pre-stream exceptions and just letting them throw
1 parent 07c91c6 commit 98de99e

File tree

1 file changed

+11
-17
lines changed

1 file changed

+11
-17
lines changed

packages/core/src/awsService/cloudWatchLogs/registry/liveTailSession.ts

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -82,24 +82,18 @@ export class LiveTailSession {
8282
}
8383

8484
public async startLiveTailSession(): Promise<AsyncIterable<StartLiveTailResponseStream>> {
85-
const command = this.buildStartLiveTailCommand()
86-
try {
87-
const commandOutput = await this.liveTailClient.cwlClient.send(command, {
88-
abortSignal: this.liveTailClient.abortController.signal,
89-
})
90-
if (!commandOutput.responseStream) {
91-
throw new ToolkitError('LiveTail session response stream is undefined.')
92-
}
93-
this.startTime = Date.now()
94-
this.endTime = undefined
95-
this.statusBarUpdateTimer = globals.clock.setInterval(() => {
96-
this.updateStatusBarItemText()
97-
}, 500)
98-
99-
return commandOutput.responseStream
100-
} catch (e) {
101-
throw new ToolkitError('Encountered error while trying to start LiveTail session.')
85+
const commandOutput = await this.liveTailClient.cwlClient.send(this.buildStartLiveTailCommand(), {
86+
abortSignal: this.liveTailClient.abortController.signal,
87+
})
88+
if (!commandOutput.responseStream) {
89+
throw new ToolkitError('LiveTail session response stream is undefined.')
10290
}
91+
this.startTime = Date.now()
92+
this.endTime = undefined
93+
this.statusBarUpdateTimer = globals.clock.setInterval(() => {
94+
this.updateStatusBarItemText()
95+
}, 500)
96+
return commandOutput.responseStream
10397
}
10498

10599
public stopLiveTailSession() {

0 commit comments

Comments
 (0)