FriendsOfPHP / Goutte

Goutte, a simple PHP Web Scraper
MIT License
9.26k stars 1.01k forks source link

Allow exceptions on http errors #355

Closed janvernieuwe closed 6 years ago

janvernieuwe commented 6 years ago

Guzzle throws exceptions on 404's, but they are cought and return the response here. https://github.com/FriendsOfPHP/Goutte/blob/3f0eaf0a40181359470651f1565b3e07e3dd31b8/Goutte/Client.php#L182

It would be useful to make it configurable to always rethrow those exceptions there, or leave the choice up to the user with the http_errors option of guzzle and not catch those exceptions at all.