Closed zenspider closed 4 years ago
This is an interesting point, I guess that's because the autoload expects the class FollowRedirects
to be mentioned before loading the file.
But the above doesn't work if you're rescuing errors defined in those classes 🤔...
Possible solution might be to define errors in a separate file that is always loaded. I'll take a look after we're done with the 1.0 release, this could possibly be back-ported to the 0.1x series as a bugfix.
We have merged #247, which addresses this issue. Thanks for the report, it helps a lot!
We have to explicitly require
"faraday_middleware/response/follow_redirects"
in our tests if we're to refer toFaradayMiddleware::RedirectLimitReached
because the autoloads at the top are not sufficient.