-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
status codes for discovery client #3513
Conversation
discovery/client.go
Outdated
@@ -116,7 +110,7 @@ func (r *defaultClientRegistrationManager) activate(ctx context.Context, service | |||
subjectDIDs = subjectDIDs[:j] | |||
|
|||
if len(subjectDIDs) == 0 { | |||
return fmt.Errorf("%w: %w for %s", ErrPresentationRegistrationFailed, didsubject.ErrSubjectNotFound, subjectID) | |||
return fmt.Errorf("%w: %w for %s", ErrPresentationRegistrationFailed, ErrDIDMethodsNotSupported, subjectID) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to change the error to something like: "no active DIDs found for subject"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The check here is that the subject has one or more DIDs that are in the accepted DID methods (error removed above) AND that at least one of the DIDs is active. The second part is internal bookkeeping that imo should not be in the response.
this way it is consistent with deactivate
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added a new error for this with message subject has no (active) DIDs matching the service
* master: (72 commits) PKI add ValidateStrict (#3531) PEX: Return capture group for matched patterns (#3526) Schedule CodeQL twice a week (#3525) change cron schedule (#3524) Add gh action for CodeQL schedule (#3523) Bump github.com/lestrrat-go/jwx/v2 from 2.1.1 to 2.1.2 (#3520) docs: v6 release date (#3519) status codes for discovery client (#3513) Require SQL connection string in strictmode (#3517) Fix duplicate discovery results (#3515) Bump github.com/chromedp/chromedp from 0.11.0 to 0.11.1 (#3514) fix duplicate search results for wildcard param (#3512) Bump github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azkeys (#3511) remove network migration and optimize network event retry (#3510) secure outgoing http client with max connections (#3508) make gen-mocks (#3509) Bump github.com/Azure/azure-sdk-for-go/sdk/azcore from 1.15.0 to 1.16.0 (#3506) fix invalid keyReference migration objects (#3504) Bump go.uber.org/mock from 0.4.0 to 0.5.0 (#3507) Bump github.com/nats-io/nats-server/v2 from 2.10.21 to 2.10.22 (#3505) ... # Conflicts: # vcr/test.go # vdr/legacy_integration_test.go # vdr/vdr.go # vdr/vdr_test.go
closes #3502
PR contains
api/server#client.New