Skip to content

Commit

Permalink
Discovery: do not log 'missing credentials' if other DIDs are success…
Browse files Browse the repository at this point in the history
…fully registered (#3447)
  • Loading branch information
reinkrul authored Oct 4, 2024
1 parent 1e3e2c1 commit 9ec13e7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion discovery/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,12 @@ func (r *defaultClientRegistrationManager) activate(ctx context.Context, service
for _, subjectDID := range subjectDIDs {
err := r.registerPresentation(ctx, subjectDID, service, parameters)
if err != nil {
loopErrs = append(loopErrs, fmt.Errorf("%s: %w", subjectDID.String(), err))
if !errors.Is(err, pe.ErrNoCredentials) { // ignore missing credentials
loopErrs = append(loopErrs, fmt.Errorf("%s: %w", subjectDID.String(), err))
} else {
// trace logging for missing credentials
log.Logger().Tracef("Missing credentials for Discovery Service (service=%s, subject=%s, did=%s): %s", service.ID, subjectID, subjectDID, err.Error())
}
} else {
registeredDIDs = append(registeredDIDs, subjectDID.String())
}
Expand Down

0 comments on commit 9ec13e7

Please sign in to comment.