Skip to content

Commit a2e9a09

Browse files
committed
return content of the server response if failure, close #25
1 parent 3c8b13b commit a2e9a09

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/WebPush.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public function sendNotification($endpoint, $payload = null, $userPublicKey = nu
120120
*
121121
* @return array|bool If there are no errors, return true.
122122
* If there were no notifications in the queue, return false.
123-
* Else return an array of information for each notification sent (success, statusCode, headers).
123+
* Else return an array of information for each notification sent (success, statusCode, headers, content).
124124
*
125125
* @throws \ErrorException
126126
*/
@@ -165,6 +165,7 @@ public function flush()
165165
'success' => false,
166166
'statusCode' => $response->getStatusCode(),
167167
'headers' => $response->getHeaders(),
168+
'content' => $response->getContent(),
168169
);
169170

170171
$completeSuccess = false;

0 commit comments

Comments
 (0)