toErrorCode method

ErrorCode toErrorCode()

Implementation

ErrorCode toErrorCode() {
  switch (this) {
    case 'DEPENDENCY_ACCESS_DENIED_ERROR':
      return ErrorCode.dependencyAccessDeniedError;
    case 'DEPENDENCY_THROTTLING_ERROR':
      return ErrorCode.dependencyThrottlingError;
    case 'DEPENDENCY_SERVICE_ERROR':
      return ErrorCode.dependencyServiceError;
    case 'SERVICE_QUOTA_NOT_AVAILABLE_ERROR':
      return ErrorCode.serviceQuotaNotAvailableError;
  }
  throw Exception('$this is not known in enum ErrorCode');
}