Skip to content

Commit 9ec13e7

Browse files
authored
Discovery: do not log 'missing credentials' if other DIDs are successfully registered (#3447)
1 parent 1e3e2c1 commit 9ec13e7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

discovery/client.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,12 @@ func (r *defaultClientRegistrationManager) activate(ctx context.Context, service
9999
for _, subjectDID := range subjectDIDs {
100100
err := r.registerPresentation(ctx, subjectDID, service, parameters)
101101
if err != nil {
102-
loopErrs = append(loopErrs, fmt.Errorf("%s: %w", subjectDID.String(), err))
102+
if !errors.Is(err, pe.ErrNoCredentials) { // ignore missing credentials
103+
loopErrs = append(loopErrs, fmt.Errorf("%s: %w", subjectDID.String(), err))
104+
} else {
105+
// trace logging for missing credentials
106+
log.Logger().Tracef("Missing credentials for Discovery Service (service=%s, subject=%s, did=%s): %s", service.ID, subjectID, subjectDID, err.Error())
107+
}
103108
} else {
104109
registeredDIDs = append(registeredDIDs, subjectDID.String())
105110
}

0 commit comments

Comments
 (0)