From 22b92c7c00d495b4a9cb043bc592aa5a3f9065c8 Mon Sep 17 00:00:00 2001 From: Ben Dubuisson Date: Mon, 10 Jul 2017 19:18:17 +1200 Subject: [PATCH] Fixed message not being passed to client when capturing an exception The raven client expects the message to be at the first level of the data array when passing an exception. see https://github.com/getsentry/sentry-php/blob/master/lib/Raven/Client.php#L795 --- src/Monolog/Handler/RavenHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Monolog/Handler/RavenHandler.php b/src/Monolog/Handler/RavenHandler.php index eb5dda08..34ff0091 100644 --- a/src/Monolog/Handler/RavenHandler.php +++ b/src/Monolog/Handler/RavenHandler.php @@ -180,7 +180,7 @@ class RavenHandler extends AbstractProcessingHandler } if (isset($record['context']['exception']) && ($record['context']['exception'] instanceof \Exception || (PHP_VERSION_ID >= 70000 && $record['context']['exception'] instanceof \Throwable))) { - $options['extra']['message'] = $record['formatted']; + $options['message'] = $record['formatted']; $this->ravenClient->captureException($record['context']['exception'], $options); } else { $this->ravenClient->captureMessage($record['formatted'], array(), $options);