Skip to content

Commit c739eae

Browse files
committed
Catch on PgException
1 parent 155c32f commit c739eae

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/lib/service/services.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import 'package:gcloud/service_scope.dart';
1414
import 'package:gcloud/storage.dart';
1515
import 'package:googleapis_auth/auth_io.dart' as auth;
1616
import 'package:logging/logging.dart';
17+
import 'package:postgres/postgres.dart';
1718
import 'package:pub_dev/database/database.dart';
1819
import 'package:pub_dev/package/api_export/api_exporter.dart';
1920
import 'package:pub_dev/search/handlers.dart';
@@ -253,7 +254,7 @@ Future<R> _withPubServices<R>(FutureOr<R> Function() fn) async {
253254

254255
try {
255256
await PrimaryDatabase.tryRegisterInScope();
256-
} catch (e, st) {
257+
} on PgException catch (e, st) {
257258
if (envConfig.isRunningInAppengine) {
258259
// ignore setup issues for now
259260
_logger.warning('Could not connect to Postgresql database.', e, st);

0 commit comments

Comments
 (0)