Skip to content

Commit fd230b9

Browse files
committed
Returned correct push endpoint in case of error.
1 parent 720b344 commit fd230b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/web-push-lib.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ WebPushLib.prototype.sendNotification =
273273
pushResponse.on('end', function() {
274274
if (pushResponse.statusCode !== 201) {
275275
reject(new WebPushError('Received unexpected response code',
276-
pushResponse.statusCode, pushResponse.headers, responseText, subscription.endpoint));
276+
pushResponse.statusCode, pushResponse.headers, responseText, requestDetails.endpoint));
277277
} else {
278278
resolve({
279279
statusCode: pushResponse.statusCode,

0 commit comments

Comments
 (0)