sqlectron-gui icon indicating copy to clipboard operation
sqlectron-gui copied to clipboard

Expose reason info for SSH errors

Open maxclaus opened this issue 4 years ago • 0 comments

I noticed that the reason info is not present in the UI error message when a SSH connection fails, and that field is usually more helpful than the description itself https://github.com/mscdex/ssh2/blob/v0.8.x/lib/client.js#L1206

Screen Shot 2021-03-18 at 09 58 13

Printing that info object directly from ssh2 module I could understand better why that was failing:

{
   recipient: 0,
   reasonCode: 1,
   reason: 'ADMINISTRATIVELY_PROHIBITED',
   description: 'open failed',
   lang: ''
}

maxclaus avatar Mar 18 '21 12:03 maxclaus