// GetActor returns the actor for the given IRI. Returns an ErrNoFound error if the actor is not in the store.
GetActor returns the actor for the given IRI. Returns an ErrNoFound error if the actor is not in the store.
// GetActor returns the actor for the given IRI . Returns an ErrNoFound error if the actor is not in the store .
func (s *Provider) GetActor(iri *url.URL) (*vocab.ActorType, error) { 
	logger.Debugf("[%s] Retrieving actor [%s]", s.serviceName, iri)
	actorBytes, err := s.actorStore.Get(iri.String())
	if err != nil {
		if errors.Is(err, ariesstorage.ErrDataNotFound) {
			return nil, spi.ErrNotFound
		}
		return nil,
			orberrors.NewTransient(fmt.Errorf("unexpected failure while getting actor from store: %w", err))
	}
	var actor vocab.ActorType
	err = json.Unmarshal(actorBytes, &actor)
	if err != nil {
		return nil, fmt.Errorf("failed to unmarshal actor bytes: %w", err)
	}
	return &actor, nil
}
func ( s * Provider ) GetActor ( iri * url . URL ) ( * vocab . ActorType , error ) { logger . Debugf ( " " , s . serviceName , iri ) actorBytes , err := s . actorStore . Get ( iri . String ( ) ) if err != nil { if errors . Is ( err , ariesstorage . ErrDataNotFound ) { return nil , spi . ErrNotFound } return nil , orberrors . NewTransient ( fmt . Errorf ( " " , err ) ) } var actor vocab . ActorType err = json . Unmarshal ( actorBytes , & actor ) if err != nil { return nil , fmt . Errorf ( " " , err ) } return & actor , nil }
GetActor returns the actor for the given IRI.
GetActor returns the actor for the given IRI .
//nolint: dupl // false positive