File tree Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ abstract class ErrorMethodResponse extends MethodResponse {
14
14
static final accountNotFound = ErrorType ("accountNotFound" );
15
15
static final accountNotSupportedByMethod = ErrorType ("accountNotSupportedByMethod" );
16
16
static final accountReadOnly = ErrorType ("accountReadOnly" );
17
+ static final cannotCalculateChanges = ErrorType ("cannotCalculateChanges" );
17
18
18
19
final ErrorType type;
19
20
final String ? description;
@@ -62,4 +63,20 @@ class AccountNotSupportedByMethod extends ErrorMethodResponse {
62
63
63
64
class AccountReadOnly extends ErrorMethodResponse {
64
65
AccountReadOnly ({String ? description}) : super (ErrorMethodResponse .accountReadOnly, description: description);
66
+ }
67
+
68
+ class CannotCalculateChangesMethodResponse extends ErrorMethodResponse {
69
+ CannotCalculateChangesMethodResponse ({String ? description}) : super (
70
+ ErrorMethodResponse .cannotCalculateChanges,
71
+ description: description);
72
+ }
73
+
74
+ class UndefinedErrorMethodResponse extends ErrorMethodResponse {
75
+ UndefinedErrorMethodResponse (
76
+ ErrorType errorType,
77
+ {String ? description}
78
+ ) : super (
79
+ errorType,
80
+ description: description
81
+ );
65
82
}
Original file line number Diff line number Diff line change @@ -67,8 +67,12 @@ class ResponseObject with EquatableMixin {
67
67
return ServerUnavailableMethodResponse (description: description);
68
68
} else if (errorType == ErrorMethodResponse .unknownMethod) {
69
69
return UnknownMethodResponse (description: description);
70
- } else {
70
+ } else if (errorType == ErrorMethodResponse .serverFail) {
71
71
return ServerFailMethodResponse (description: description);
72
+ } else if (errorType == ErrorMethodResponse .cannotCalculateChanges) {
73
+ return CannotCalculateChangesMethodResponse (description: description);
74
+ } else {
75
+ return UndefinedErrorMethodResponse (errorType, description: description);
72
76
}
73
77
} catch (e) {
74
78
developer.log ("_parsingErrorMethodResponse(): Exception $e " );
You can’t perform that action at this time.
0 commit comments