Skip to content

fix(connections): surface PostgreSQL connection errors instead of swallowing them - #262

Merged
ZhuchkaTriplesix merged 2 commits into
devfrom
issue/250-251-252-postgres-error-reporting
Jul 10, 2026
Merged

fix(connections): surface PostgreSQL connection errors instead of swallowing them#262
ZhuchkaTriplesix merged 2 commits into
devfrom
issue/250-251-252-postgres-error-reporting

Conversation

@ZhuchkaTriplesix

Copy link
Copy Markdown
Member

Closes #250
Closes #251
Closes #252

Summary

Stop hiding PostgreSQL connection/SSL failures behind generic booleans and "Error" labels.

Changes

  • PostgresConnection.testConnection now returns ({bool ok, String? error}) so callers can display the real failure reason.
  • The PostgreSQL connection form shows the underlying error message when the test fails.
  • The connection tree sidebar shows the actual exception message (with tooltip) instead of the static 'Error' label.

Test plan

  • flutter test test/core/database/postgres_connection_test.dart (40 tests, all passing).
  • flutter test test/features/postgresql/postgresql_connection_form_test.dart (4 tests, all passing).

#249, #253, #254, #257, #258)

- Reject unsupported sslmode values (e.g. prefer, invalid) for PostgreSQL.
- Map disable → useSSL=false; require, verify-ca, verify-full → useSSL=true.
- Only store an explicit URI port; fall back to driver defaults when omitted.
- Keep host:port in display name when no database is present.
…llowing them (#250, #251, #252)

- Return ({bool ok, String? error}) from PostgresConnection.testConnection so
  the form can show the real failure reason.
- Display the actual exception message in the connection tree instead of the
  static 'Error' label.
@github-actions github-actions Bot added the bug Something isn't working label Jul 10, 2026
@ZhuchkaTriplesix
ZhuchkaTriplesix merged commit cb50ca7 into dev Jul 10, 2026
4 checks passed
@ZhuchkaTriplesix ZhuchkaTriplesix self-assigned this Jul 12, 2026
@ZhuchkaTriplesix
ZhuchkaTriplesix deleted the issue/250-251-252-postgres-error-reporting branch July 26, 2026 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant