Skip to content

Commit 70478fe

Browse files
[6.x] Improved Pusher broadcast exception message (#33416)
* Update PusherBroadcaster.php * Update PusherBroadcaster.php Co-authored-by: Taylor Otwell <[email protected]>
1 parent 0c2e28e commit 70478fe

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Illuminate/Broadcasting/Broadcasters/PusherBroadcaster.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,9 @@ public function broadcast(array $channels, $event, array $payload = [])
119119
}
120120

121121
throw new BroadcastException(
122-
is_bool($response) ? 'Failed to connect to Pusher.' : $response['body']
122+
isset($response['body'])
123+
? sprintf('Pusher error: %s.', $response['status'])
124+
: 'Failed to connect to Pusher.'
123125
);
124126
}
125127

0 commit comments

Comments
 (0)