From 5ada327236e2d1196deadd8f7c775c3b8cf08618 Mon Sep 17 00:00:00 2001 From: Nabeel Shahzad Date: Fri, 4 Jun 2021 13:57:16 -0400 Subject: [PATCH] Log request/response for Discord --- app/Notifications/Channels/Discord/Discord.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Notifications/Channels/Discord/Discord.php b/app/Notifications/Channels/Discord/Discord.php index 4aad7835..30cdd77d 100644 --- a/app/Notifications/Channels/Discord/Discord.php +++ b/app/Notifications/Channels/Discord/Discord.php @@ -29,8 +29,10 @@ class Discord $data = $message->toArray(); $this->httpClient->post($message->webhook_url, $data); } catch (RequestException $e) { + $request = Psr7\Message::toString($e->getRequest()); $response = Psr7\Message::toString($e->getResponse()); - Log::error('Error sending Discord notification: '.$e->getMessage().', '.$response); + Log::error('Error sending Discord notification: request: '.$e->getMessage().', '.$request); + Log::error('Error sending Discord notification: response: '.$response); } } }