fix: pass full ssh error to browser
This commit is contained in:
parent
3133ad8e97
commit
27d9bfb97e
2 changed files with 3 additions and 7 deletions
|
@ -157,10 +157,8 @@ class WebSSH2Socket extends EventEmitter {
|
||||||
debug(
|
debug(
|
||||||
`initializeConnection: SSH CONNECTION ERROR: ${this.socket.id}, Host: ${creds.host}, Error: ${err.message}`
|
`initializeConnection: SSH CONNECTION ERROR: ${this.socket.id}, Host: ${creds.host}, Error: ${err.message}`
|
||||||
)
|
)
|
||||||
handleError(
|
handleError(new SSHConnectionError(`${err.message}`))
|
||||||
new SSHConnectionError(`SSH CONNECTION ERROR: ${err.message}`)
|
this.socket.emit("ssherror", `${err.message}`)
|
||||||
)
|
|
||||||
this.socket.emit("ssherror", `SSH CONNECTION ERROR: ${err.message}`)
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -49,9 +49,7 @@ class SSHConnection extends EventEmitter {
|
||||||
})
|
})
|
||||||
|
|
||||||
this.conn.on("error", err => {
|
this.conn.on("error", err => {
|
||||||
const error = new SSHConnectionError(
|
const error = new SSHConnectionError(`${err.message}`)
|
||||||
`SSH Connection error: ${err.message}`
|
|
||||||
)
|
|
||||||
handleError(error)
|
handleError(error)
|
||||||
reject(error)
|
reject(error)
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue