tpeczek / Lib.Net.Http.WebPush

Lib.Net.Http.WebPush is a library which provides a Web Push Protocol based client for Push Service.
MIT License
75 stars 13 forks source link

Enhancement: Expose PushScription & Response Headers in PushServiceClientException #18

Closed techfg closed 4 years ago

techfg commented 4 years ago

When queuing up multiple messages to send and waiting for them to complete, when an exception occurs within one (or more) notifications, there's currently no way to know which one failed as PushServiceClientException only exposes the statuscode & reasonphrase. Would like to see PushSubscription & Response Headers added to exception.

The need for this stems from being able to clean-up subscriptions in the datastore when they're no longer registered.

Fortunately, the subscription is available where this would be needed and the full response is already in the method that generates the exception.

Thank you!