Skip to content

Commit 6cc34dc

Browse files
committed
Add no description given in exception.
1 parent 8bacfab commit 6cc34dc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Exceptions/CouldNotSendNotification.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ public static function telegramRespondedWithAnError(ClientException $exception)
1717
{
1818
$statusCode = $exception->getResponse()->getStatusCode();
1919

20-
$description = '';
20+
$description = 'no description given';
2121

2222
if ($result = json_decode($exception->getResponse()->getBody())) {
23-
$description = $result->description ?: '';
23+
$description = $result->description ?: $description;
2424
}
2525

2626
return new static("Telegram responded with an error `{$statusCode} - {$description}`");

0 commit comments

Comments
 (0)