Skip to content
This repository was archived by the owner on May 13, 2023. It is now read-only.

Commit 488e330

Browse files
authored
fix: catch error return type fixed (#98)
1 parent 43dc614 commit 488e330

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/src/postgrest_builder.dart

+2-3
Original file line numberDiff line numberDiff line change
@@ -371,8 +371,7 @@ class PostgrestBuilder<T, S> implements Future<T> {
371371
}
372372

373373
@override
374-
Future<T?> catchError(Function onError,
375-
{bool Function(Object error)? test}) async {
374+
Future<T> catchError(Function onError, {bool Function(Object error)? test}) {
376375
return then((value) => value).catchError(onError, test: test);
377376
}
378377

@@ -440,7 +439,7 @@ class PostgrestBuilder<T, S> implements Future<T> {
440439
}
441440

442441
@override
443-
Future<T?> timeout(Duration timeLimit, {FutureOr<T?> Function()? onTimeout}) {
442+
Future<T> timeout(Duration timeLimit, {FutureOr<T> Function()? onTimeout}) {
444443
return then((value) => value).timeout(timeLimit, onTimeout: onTimeout);
445444
}
446445

0 commit comments

Comments
 (0)