-
-
Notifications
You must be signed in to change notification settings - Fork 102
Description
Currently the Platform does not really handle API errors well, which is quite a pain for developers when running into errors. It's basically invisible what the API complains about.
For example:
PHP Fatal error: Uncaught Symfony\AI\Platform\Exception\RuntimeException: Response does not contain any content. in /home/christopher/Projects/SymfonyAI/repo/src/platform/src/Bridge/Anthropic/ResultConverter.php:48
Stack trace:
#0 /home/christopher/Projects/SymfonyAI/repo/src/platform/src/Result/ResultPromise.php(48): Symfony\AI\Platform\Bridge\Anthropic\ResultConverter->convert()
#1 /home/christopher/Projects/SymfonyAI/repo/src/platform/src/Result/ResultPromise.php(37): Symfony\AI\Platform\Result\ResultPromise->await()
#2 /home/christopher/Projects/SymfonyAI/repo/src/agent/src/Agent.php(93): Symfony\AI\Platform\Result\ResultPromise->getResult()
#3 /home/christopher/Projects/SymfonyAI/repo/examples/anthropic/image-input-binary.php(32): Symfony\AI\Agent\Agent->call()
#4 {main}
thrown in /home/christopher/Projects/SymfonyAI/repo/src/platform/src/Bridge/Anthropic/ResultConverter.php on line 48
See #167 for inspiration.