fix(sentry): resolve minified exception types on web release
This commit is contained in:
@@ -39,7 +39,7 @@ class ServerSettingsAPI with HandleSetErrorMixin {
|
||||
)?.list.firstOrNull;
|
||||
|
||||
if (serverSettings == null) {
|
||||
throw NotFoundServerSettingsException();
|
||||
throw const NotFoundServerSettingsException();
|
||||
}
|
||||
|
||||
return serverSettings;
|
||||
@@ -81,10 +81,10 @@ class ServerSettingsAPI with HandleSetErrorMixin {
|
||||
)?.updated ?? {};
|
||||
|
||||
if (updateServerSettingsResult.isEmpty) {
|
||||
throw CanNotUpdateServerSettingsException();
|
||||
throw const CanNotUpdateServerSettingsException();
|
||||
}
|
||||
} on ErrorMethodResponseException catch (_) {
|
||||
throw CanNotUpdateServerSettingsException();
|
||||
throw const CanNotUpdateServerSettingsException();
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -94,12 +94,12 @@ class ServerSettingsAPI with HandleSetErrorMixin {
|
||||
)?.list.firstOrNull;
|
||||
|
||||
if (updatedServerSettings == null) {
|
||||
throw CanNotUpdateServerSettingsException();
|
||||
throw const CanNotUpdateServerSettingsException();
|
||||
}
|
||||
|
||||
return updatedServerSettings;
|
||||
} on ErrorMethodResponseException catch (_) {
|
||||
throw CanNotUpdateServerSettingsException();
|
||||
throw const CanNotUpdateServerSettingsException();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,21 +1,21 @@
|
||||
import 'package:core/domain/exceptions/app_base_exception.dart';
|
||||
|
||||
class NotFoundServerSettingsException extends AppBaseException {
|
||||
NotFoundServerSettingsException([super.message]);
|
||||
const NotFoundServerSettingsException([super.message]);
|
||||
|
||||
@override
|
||||
String get exceptionName => 'NotFoundServerSettingsException';
|
||||
}
|
||||
|
||||
class NotFoundSettingOptionException extends AppBaseException {
|
||||
NotFoundSettingOptionException([super.message]);
|
||||
const NotFoundSettingOptionException([super.message]);
|
||||
|
||||
@override
|
||||
String get exceptionName => 'NotFoundSettingOptionException';
|
||||
}
|
||||
|
||||
class CanNotUpdateServerSettingsException extends AppBaseException {
|
||||
CanNotUpdateServerSettingsException([super.message]);
|
||||
const CanNotUpdateServerSettingsException([super.message]);
|
||||
|
||||
@override
|
||||
String get exceptionName => 'CanNotUpdateServerSettingsException';
|
||||
|
||||
@@ -17,7 +17,7 @@ class GetServerSettingInteractor {
|
||||
final serverSetting = await _serverSettingsRepository.getServerSettings(accountId);
|
||||
final settingOption = serverSetting.settings;
|
||||
if (settingOption == null) {
|
||||
yield Left(GetServerSettingFailure(NotFoundSettingOptionException()));
|
||||
yield Left(GetServerSettingFailure(const NotFoundSettingOptionException()));
|
||||
} else {
|
||||
yield Right(GetServerSettingSuccess(settingOption));
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ class UpdateServerSettingInteractor {
|
||||
);
|
||||
final settingOption = serverSetting.settings;
|
||||
if (settingOption == null) {
|
||||
yield Left(UpdateServerSettingFailure(NotFoundServerSettingsException()));
|
||||
yield Left(UpdateServerSettingFailure(const NotFoundServerSettingsException()));
|
||||
} else {
|
||||
yield Right(UpdateServerSettingSuccess(settingOption));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user