fix(web): raise only TERMINATED message on session termination with the error backtrace

When the session ends with an error, `iron-remote-desktop` raises `ERROR` in pair with `TERMINATED`. Handling function in Devolutions Gateway Standalone handles these types of events similarly. In result, we see only the message from `TERMINATED` event in the `error notify bar`, because the message from `ERROR` is overwritten.

This commit fixes the issue by only raising the `TERMINATED` with the error backtrace.
This commit is contained in:
Alex Yusiuk 2025-06-24 15:51:41 +03:00
parent 153fe3c20d
commit d03f19dd95

View file

@ -188,13 +188,9 @@ export class RemoteDesktopService {
.catch((err: IronError) => {
this.setVisibility(false);
this.raiseSessionEvent({
type: SessionEventType.ERROR,
data: err.backtrace(),
});
this.raiseSessionEvent({
type: SessionEventType.TERMINATED,
data: 'Session was terminated.',
data: 'Session was terminated with an error: ' + err.backtrace() + '.',
});
});
}