TF-1613 Add InternalServerError to RemoteExceptionThrower

(cherry picked from commit 5f54d8e3975b42721f45d54ff44bec2ef6508911)
This commit is contained in:
dab246
2023-04-04 15:26:43 +07:00
committed by Dat Vu
parent 72acf7e7e2
commit b020bcc6c0
2 changed files with 41 additions and 31 deletions
@@ -5,6 +5,7 @@ import 'package:jmap_dart_client/jmap/core/error/method/error_method_response.da
abstract class RemoteException with EquatableMixin implements Exception {
static const connectError = 'Connect error';
static const internalServerError = 'Internal Server Error';
static const noNetworkError = 'No network error';
static const badCredentials = 'Bad credentials';
@@ -35,6 +36,13 @@ class ConnectError extends RemoteException {
List<Object> get props => [];
}
class InternalServerError extends RemoteException {
const InternalServerError() : super(message: RemoteException.internalServerError);
@override
List<Object> get props => [];
}
class MethodLevelErrors extends RemoteException {
final ErrorType type;