-
Notifications
You must be signed in to change notification settings - Fork 304
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
Fix validation error of protocol not beeing returned #843
Fix validation error of protocol not beeing returned #843
Conversation
Fixes web-push-libs#830 Fix the "https: or mailto:" error being overwritten by the error in the catch by passing upwards trough the cause property
Fixes web-push-libs#830 Change the solution based on the review
Thanks! |
Oops, there is still some error:
|
It makes sense since the subjectParseResult is now scoped, sorry. Do you prefer an approach like defining the variable before the try?
|
Yeah, let's do: let subjectParseResult = null;
try {
subjectParseResult = new URL(subject); |
Fixes #830
Fix the "https: or mailto:" error being overwritten by the error in the catch by passing it upwards trough the cause property