You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
try:
signature=signer.sign(bytes_data)
exceptExceptionase:
raiseUnsignedMetadataError("Problem signing the metadata") frome
The reason we're catching Exception is that we have no idea what kind of errors might happen in Signer.sign() -- as an example, what does a Google Cloud Authentication error look like?
However, we do have to improve this somehow, maybe just leave generic exception handling to the application (which was the other approach we considered IIRC): this current approach leads to e.g. this:
application signs with a HSMSigner, this leads to secret handler getting called "Please enter PIN:"
user decides they don't want to sign and presses ctrl-C
application sees UnsignedMetadataError -- the logical assumption is a PIN input error so application tries signing again "Please enter PIN:"
user is stuck without ability to exit without signing
I don't see reasonable ways to solve this within the application: Ctrl-C really should exit and not be a UnsignedMetadataError
The text was updated successfully, but these errors were encountered:
Metadata.sign():
The reason we're catching Exception is that we have no idea what kind of errors might happen in Signer.sign() -- as an example, what does a Google Cloud Authentication error look like?
However, we do have to improve this somehow, maybe just leave generic exception handling to the application (which was the other approach we considered IIRC): this current approach leads to e.g. this:
I don't see reasonable ways to solve this within the application: Ctrl-C really should exit and not be a UnsignedMetadataError
The text was updated successfully, but these errors were encountered: