phergie / plugin-http

MIT License
3 stars 6 forks source link

Log error messages on failed requests. #11

Closed sitedyno closed 7 years ago

sitedyno commented 7 years ago

Reddit was blocking requests because the bot was using guzzle's default user agent. This would have made it a tad easier to see why.

This will put something like the following in your log on a failed request:

[2017-03-24 18:42:23] phergie.DEBUG: [Http][58d5a0cf3ccc8] ["Client error response [url] http://not-a-real-url.com/ [status code] 429 [reason phrase] Too Many Requests"] []

WyriHaximus commented 7 years ago

Thanks :+1: