Skip to content

Commit

Permalink
perf: only zmodem session have file error message
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeEirc committed Oct 16, 2024
1 parent 24fd8ea commit 1309236
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ui/src/hooks/useTerminal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,10 @@ export const useTerminal = async (el: HTMLElement, option: ICallbackOptions): Pr
try {
sentry.consume(event.data);
} catch (e) {
sentry.get_confirmed_session()?.abort()
message.error('File transfer error, file transfer interrupted');
if (sentry.get_confirmed_session()) {
sentry.get_confirmed_session()?.abort();
message.error('File transfer error, file transfer interrupted');
}
console.log(e);
}

Expand Down

0 comments on commit 1309236

Please sign in to comment.