mirror of
https://github.com/immich-app/immich.git
synced 2026-07-04 19:57:28 -07:00
12f7b2a005
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
12 lines
274 B
Dart
12 lines
274 B
Dart
import 'package:immich_mobile/constants/errors.dart';
|
|
|
|
abstract class ApiRepository {
|
|
Future<T> checkNull<T>(Future<T?> future) async {
|
|
final response = await future;
|
|
if (response == null) {
|
|
throw const NoResponseDtoError();
|
|
}
|
|
return response;
|
|
}
|
|
}
|