parseAndThrowError method

  1. @override
void parseAndThrowError(
  1. Map<String, dynamic> response
)
override

Implementation

@override
void parseAndThrowError(Map<String, dynamic> response) {
  final message = response['error']?['message'];
  var code = response['error']?['code'];

  if (code == null && !SendTransactionErrorCodes.values.contains(code)) {
    code = SendTransactionErrorCodes.unknownError;
  }

  throw SendTransactionErrors.getError(code, message);
}