-
Notifications
You must be signed in to change notification settings - Fork 516
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
Add multiple kid per key feature, kid removal and get by kid routes #3472
base: main
Are you sure you want to change the base?
Add multiple kid per key feature, kid removal and get by kid routes #3472
Conversation
Signed-off-by: PatStLouis <[email protected]>
Signed-off-by: PatStLouis <[email protected]>
Signed-off-by: PatStLouis <[email protected]>
Signed-off-by: PatStLouis <[email protected]>
Signed-off-by: PatStLouis <[email protected]>
Quality Gate failedFailed conditions |
@@ -131,14 +135,58 @@ async def assign_kid_to_key(self, verkey: str, kid: str) -> KeyInfo: | |||
if not key_entry: | |||
raise WalletNotFoundError(f"No key entry found for verkey {verkey}") | |||
|
|||
try: | |||
existing_kid = key_entry.tags.get("kid") |
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.
key_entry.tags.get("kid", [])
raise WalletError(f"Unknown key type {key.algorithm.value}") | ||
try: | ||
existing_kid.remove(kid) | ||
except Exception: |
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.
Should catch the correct type of exception for removing entry that doesn't exist. Can't remember of the top of my head.
In general try to only catch the base Exception class when nessecary.
No description provided.