╭ changed ────────╮ │src/serve_ssh.zig│ ╰─────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │194 // runTui owns the terminal, whose deinit restores the client's screen and │ │195 // runs as the function unwinds — so any error it returns leaves the TUI torn │ │196 // down and we can surface the failure on the restored screen before exiting. │ │197 - runTui(handler, sess, pty) catch |err| { │ │197 + runTui(handler, sess, pty) catch |tui_err| { │ │198 + const err = sess.underlyingError(tui_err); │ │199 serve_common.logError(sess.conn.io, handler.err, "ssh tui session failed: {s}\n", .{@errorName(err)}); │ │200 var buf: [256]u8 = undefined; │ │201 const msg = std.fmt.bufPrint(&buf, "haxy ssh: {s}\r\n", .{@errorName(err)}) catch "haxy ssh: internal error\r\n";│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯