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
In functions such as RSA.parseKey & RSA.importKey, it's likely a smarter idea to implement Promises so developers can catch errors more effectively. Currently, passing an invalid key into one of these functions returns a type error from the following function:
This is bad practice, especially if the developer is passing on a user-provided public key. A better implementation would be to use a Promise and reject if the key format is invalid, which would then allow the end developer to handle such error and pass it off to the user with .catch().
The text was updated successfully, but these errors were encountered:
In functions such as
RSA.parseKey
&RSA.importKey
, it's likely a smarter idea to implement Promises so developers can catch errors more effectively. Currently, passing an invalid key into one of these functions returns a type error from the following function:This is bad practice, especially if the developer is passing on a user-provided public key. A better implementation would be to use a Promise and reject if the key format is invalid, which would then allow the end developer to handle such error and pass it off to the user with .catch().
The text was updated successfully, but these errors were encountered: