[w3c/push-api] Add a messageHandlingError event (#214)

There's a pushsubscriptionchange event for if a subscription expires, or with #116, a user revokes permission. Given that there's a few different ways an event can be processed (or not), it seems odd that there's no subscription-level event that fires when an error associated with the subscription processor fails.

This can't be dealt with using an exception catcher in the message fire event, as some messaging errors occur in the browser level without even firing that event. The most obvious one in this case, if a browser fails to decrypt the message properly (app-server improperly encrypted the message), the subscription event handler doesn't fire at all.

The registered messageHandlingError would fire if the browser receives a message intended for a subscription, that cannot be decrypted (bad encryption error), or the event handler did fire but ran longer than the browser allows service worker handlers to run for.

A beneficial side-effect of this is that it might reduce an app-servers desire to use the WebPush spec's receipt's feature just to ensure the client didn't error out processing a message.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/push-api/issues/214

Received on Wednesday, 2 November 2016 03:38:47 UTC