MCPcopy
hub / github.com/nirui/sshwifty / "initialization.failed"

Method "initialization.failed"

ui/commands/ssh.js:497–521  ·  view source on GitHub ↗
(hd)

Source from the content-addressed store, hash-verified

495
496 return new SSH(sender, config, {
497 "initialization.failed"(hd) {
498 switch (hd.data()) {
499 case SERVER_REQUEST_ERROR_BAD_USERNAME:
500 self.step.resolve(
501 self.stepErrorDone("Request failed", "Invalid username")
502 );
503 return;
504
505 case SERVER_REQUEST_ERROR_BAD_ADDRESS:
506 self.step.resolve(
507 self.stepErrorDone("Request failed", "Invalid address")
508 );
509 return;
510
511 case SERVER_REQUEST_ERROR_BAD_AUTHMETHOD:
512 self.step.resolve(
513 self.stepErrorDone("Request failed", "Invalid authication method")
514 );
515 return;
516 }
517
518 self.step.resolve(
519 self.stepErrorDone("Request failed", "Unknown error: " + hd.data())
520 );
521 },
522 initialized(hd) {
523 self.step.resolve(self.stepWaitForEstablishWait(configInput.host));
524 },

Callers

nothing calls this directly

Calls 3

dataMethod · 0.45
resolveMethod · 0.45
stepErrorDoneMethod · 0.45

Tested by

no test coverage detected