diff --git a/src/SentryTarget.php b/src/SentryTarget.php index 52c00e0..eba3f12 100644 --- a/src/SentryTarget.php +++ b/src/SentryTarget.php @@ -138,7 +138,11 @@ public function export() $data['extra'] = $text; } else { - $data['message'] = (string) $text; + if($text instanceof Throwable) { + $data['exception'] = $text; + } else { + $data['message'] = (string)$text; + } } if ($this->context) {