webpush
webpush copied to clipboard
Throw `WebPushStatusException` as a checked exception
Problem
WebPush.getSubscriptionState() throws a WebPushStatusException which causes problems when calling this library from Java:
- Java tools don't neccessarily recognize that a
WebPushStatusExceptionis thrown (it's more or less invisible to Java) - in a unit test it's hard to mock an exception that Java doesn't believe to be thrown
Suggestion
Add @Throws(WebPushStatusException::class) to WebPush.getSubscriptionState()