diff --git a/src/Plugin/HistoryPlugin.php b/src/Plugin/HistoryPlugin.php index 5abddbd..b52ae5a 100644 --- a/src/Plugin/HistoryPlugin.php +++ b/src/Plugin/HistoryPlugin.php @@ -40,8 +40,10 @@ public function handleRequest(RequestInterface $request, callable $next, callabl $journal->addSuccess($request, $response); return $response; - }, function (Exception $exception) use ($request, $journal) { - $journal->addFailure($request, $exception); + }, function ($exception) use ($request, $journal) { + if ($exception instanceof Exception) { + $journal->addFailure($request, $exception); + } throw $exception; });