Use the throwable object in $context['exception'] (#207)

* Use the throwable object in $context['excpetion']

* add changelog

* remove 'exception' from context

* revert debug
This commit is contained in:
Tobias Nyholm 2025-12-27 23:46:35 +01:00 • committed by GitHub
commit 7f02285753
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -91,7 +91,7 @@ final class CallToolHandler implements RequestHandlerInterface
} catch (\Throwable $e) {
$this->logger->error('Unhandled error during tool execution', [
'name' => $toolName,
'exception' => $e->getMessage(),
'exception' => $e,
]);
return Error::forInternalError('Error while executing tool', $request->getId());