Closed
Description
Can you add the response content to the exception message?
It will help immensely when getting started.
In HandleResponse
:
// you might want to have a try/catch, there are cases when reading
// the content fails (although it should work in most cases)
var str = response.Content.ReadAsStringAsync().GetAwaiter().GetResult();
throw new WebPushException($"{message}. Details: {str}", response.StatusCode, response.Headers, subscription);
Before
WebPush.WebPushException: 'Received unexpected response code: 403'
After
WebPush.WebPushException: 'Received unexpected response code: 403. Details: the key in the authorization header does not correspond to the sender ID used to subscribe this user. Please ensure you are using the correct sender ID and server Key from the Firebase console.
Metadata
Metadata
Assignees
Labels
No labels