sd-jwt-js
sd-jwt-js copied to clipboard
fix: status list error handling
Improvement to https://github.com/openwallet-foundation/sd-jwt-js/pull/332
- rename exception to long form to make it clear
- if a custom error instance is thrown, it will be wrapped. if it's a status list exception, it will be passed
Signed-off-by: Mirko Mollik [email protected]
- if a custom error instance is thrown, it will be passed. If not, it will be wrapped
By custom error instance, do you mean the StatusListException? If not, then the code is doing the opposite.
- if a custom error instance is thrown, it will be passed. If not, it will be wrapped
By custom error instance, do you mean the StatusListException? If not, then the code is doing the opposite.
Updated the description. I want to avoid the problem that you had: when the custom verify function is used, it needs to be wrapped to see if it was thrown during the status list verification.
If you want your custom message, it has to be of type statuslist exception
Erorr cause should be available in All modern browsers and Node.JS. I'm not sure about React Native.
We use a polyfill for it, but that was from 4 years ago, and it might not be needed anymore now.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause
Erorr cause should be available in All modern browsers and Node.JS. I'm not sure about React Native.
We use a polyfill for it, but that was from 4 years ago, and it might not be needed anymore now.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause
Thanks for the useful resource, I update the extension classes to it.