Skip to content

fix(errors): the pool-exhausted StateError is shown raw, a reset connection reads as "did not accept the connection", and TLS errors have no hint #1316

Description

@ZhuchkaTriplesix

Problem

lib/core/database/database_error_mapper.dart and the pools:

  1. Raw Bad state:. The pools rethrow StateError('... connection pool exhausted: 32 slots in use.') (on StateError { rethrow; }) and it reaches the UI as Bad state: PostgreSQL connection pool exhausted....
  2. Reset vs refused. Any SocketException becomes HostUnreachableException (did not accept the connection), including Connection reset by peer and Broken pipe on a session that was working: the server closed it, it did not refuse it.
  3. TLS. HandshakeException, CERTIFICATE_VERIFY_FAILED, unknown ca, hostname mismatch are unmapped and show the raw text; the fix (SSL mode, root certificate) is not suggested.

Scope

  • Map pool exhaustion to a typed error with a hint (close unused tabs or connections).
  • A connection lost error for reset / broken pipe / EOF on an established session, with a reconnect hint.
  • A TLS error class with a hint pointing at the SSL mode and root certificate fields.
  • Mapper tests for each.

Acceptance

  • No user-facing message starts with Bad state: for pool exhaustion.
  • Connection reset by peer is not reported as refused.
  • A certificate verification failure mentions the SSL mode / root certificate.

Activity

  1. added
    bugSomething isn't working
    error-handlingTheme parser epic label: error-handling
    uxUser experience, keyboard shortcuts and interactions
    P3Low priority / Polish & Enhancements
    on Oct 10, 2026
  2. ZhuchkaTriplesix commented on Oct 10, 2026

    @ZhuchkaTriplesix
    MemberAuthor

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

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

Metadata

Metadata

Labels

P3Low priority / Polish & EnhancementsbugSomething isn't workingerror-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