Skip to content

Commit cf7b950

Browse files
authored
Better exception message when SSL is not supported. (#420)
1 parent dbfb173 commit cf7b950

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 3.5.5
4+
5+
- Better exception message when SSL is not supported.
6+
37
## 3.5.4
48

59
**Warning**: This version fixes the inconsistency of `3.5.3` by:

lib/src/v3/connection.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,9 @@ class PgConnectionImplementation extends _PgSessionBase implements Connection {
343343
adaptedStream = socket;
344344
} else {
345345
// This server does not support SSL
346-
throw PgException('Server does not support SSL, but it was required.');
346+
throw PgException(
347+
'Server does not support SSL, but it was required (default configuration). '
348+
'To disable secure connections, use `ConnectionSettings(sslMode: SslMode.disable)`.');
347349
}
348350
} else {
349351
// We've listened to the stream already and sockets are single-subscription

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: postgres
22
description: PostgreSQL database driver. Supports binary protocol, connection pooling and statement reuse.
3-
version: 3.5.4
3+
version: 3.5.5
44
homepage: https://github.com/isoos/postgresql-dart
55
topics:
66
- sql

0 commit comments

Comments
 (0)