toErrorCode method

ErrorCode toErrorCode()

Implementation

ErrorCode toErrorCode() {
  switch (this) {
    case 'InternalServiceException':
      return ErrorCode.internalServiceException;
    case 'InvalidParameterException':
      return ErrorCode.invalidParameterException;
  }
  throw Exception('$this is not known in enum ErrorCode');
}