Feature to swallow all errors, or just specific errors #61
Description
We have hit the daily cap limit, and AI bombs out with:
PHP Fatal error: Uncaught exception 'GuzzleHttp\\Exception\\ClientException' with message 'Client error:
POST https://dc.services.visualstudio.com/v2/track` resulted in a 439 Daily quota exceeded
response:\n{"itemsReceived":4,"itemsAccepted":0,"errors":[{"index":0,"statusCode":439,"message":"Daily quota exceeded"},{"index":1, (truncated...)\n' in /var/app/current/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:107\nStack trace:\n#0 /var/app/current/vendor/guzzlehttp/guzzle/src/Middleware.php(65): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Psr7\Request), Object(GuzzleHttp\Psr7\Response))\n#1 /var/app/current/vendor/guzzlehttp/promises/src/Promise.php(203): GuzzleHttp\Middleware::GuzzleHttp\{closure}(Object(GuzzleHttp\Psr7\Response))\n#2 /var/app/current/vendor/guzzlehttp/promises/src/Promise.php(156): GuzzleHttp\Promise\Promise::callHandler(1, Object(GuzzleHttp\Psr7\Response), Array)\n#3 /var/app/current/vendor/guzzlehttp/promises/src/TaskQueue.php(61): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\ in /var/app/current/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php on line 107`
It would be nice if we can make AI to ignore either all exceptions, or specific one's.
I don't think it's good if "logging code" throws errors by default.