// GetActivity returns the activity for the given ID from the activity store
// or ErrNotFound error if it wasn't found.
GetActivity returns the activity for the given ID from the activity store
or ErrNotFound error if it wasn't found.
// GetActivity returns the activity for the given ID from the activity store // or ErrNotFound error if it wasn ' t found .
func (s *Provider) GetActivity(activityID *url.URL) (*vocab.ActivityType, error) { 
	logger.Debugf("[%s] Retrieving activity - ID: %s", s.serviceName, activityID)
	activityBytes, err := s.activityStore.Get(activityID.String())
	if err != nil {
		if errors.Is(err, ariesstorage.ErrDataNotFound) {
			return nil, spi.ErrNotFound
		}
		return nil,
			orberrors.NewTransient(fmt.Errorf("unexpected failure while getting activity from store: %w", err))
	}
	var activity vocab.ActivityType
	err = json.Unmarshal(activityBytes, &activity)
	if err != nil {
		return nil, fmt.Errorf("failed to unmarshal activity bytes: %w", err)
	}
	return &activity, nil
}
func ( s * Provider ) GetActivity ( activityID * url . URL ) ( * vocab . ActivityType , error ) { logger . Debugf ( " " , s . serviceName , activityID ) activityBytes , err := s . activityStore . Get ( activityID . String ( ) ) if err != nil { if errors . Is ( err , ariesstorage . ErrDataNotFound ) { return nil , spi . ErrNotFound } return nil , orberrors . NewTransient ( fmt . Errorf ( " " , err ) ) } var activity vocab . ActivityType err = json . Unmarshal ( activityBytes , & activity ) if err != nil { return nil , fmt . Errorf ( " " , err ) } return & activity , nil }
GetActivity returns the activity for the given ID from the activity store
or ErrNotFound error if it wasn't found.
GetActivity returns the activity for the given ID from the activity store or ErrNotFound error if it wasn ' t found .
//nolint: dupl // false positive