Skip to content

fix(errors): SSH tunnel failures are reported as a database authentication failure #1305

Description

@ZhuchkaTriplesix

Problem

SshAuthenticationException text is SSH authentication failed for user@host: .... mapDatabaseError (lib/core/database/database_error_mapper.dart) matches authentication failed and returns AuthFailedException with Check the username and password in the connection settings, and describeDatabaseError returns only displayText.

The user sees Authentication failed. Check the username and password in the connection settings for a wrong bastion password or key. The bastion host, the user and the reason are lost, and the hint sends them to the database credentials.

Related: a network failure before authentication (client.authenticated throws a socket error) is also wrapped as SSH authentication failed ... $e (ssh_tunnel_manager.dart, after await client.authenticated).

Scope

  • Handle SshAuthenticationException / SshHostKeyMismatchException before the generic text matching: a mapped SshTunnelException (or keep their text) with the host, user and cause, and a hint about the tunnel settings.
  • Tell a transport failure (timeout, refused, reset) from a rejected login in openTunnel.

Acceptance

  • A wrong bastion password shows the bastion host and an SSH-specific message, not the database hint.
  • A bastion that does not answer is reported as unreachable, not as an authentication failure.
  • A database password authentication failed behind a working tunnel is still reported as a database authentication failure.

Activity

  1. added
    bugSomething isn't working
    error-handlingTheme parser epic label: error-handling
    connectionsDatabase connections, URI parsing, pools
    uxUser experience, keyboard shortcuts and interactions
    P2Medium priority / Parity & Refactoring
    on Oct 10, 2026
  2. added a commit that references this issue on Oct 10, 2026
  3. ZhuchkaTriplesix commented on Oct 10, 2026

    @ZhuchkaTriplesix
    MemberAuthor

    Сделано в #1322, смержено в dev.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

P2Medium priority / Parity & RefactoringbugSomething isn't workingconnectionsDatabase connections, URI parsing, poolserror-handlingTheme parser epic label: error-handlinguxUser experience, keyboard shortcuts and interactions

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions