Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autoloads incomplete for FaradayMiddleware::RedirectLimitReached #198

Closed
zenspider opened this issue Dec 6, 2019 · 2 comments
Closed

Autoloads incomplete for FaradayMiddleware::RedirectLimitReached #198

zenspider opened this issue Dec 6, 2019 · 2 comments
Labels

Comments

@zenspider
Copy link

We have to explicitly require "faraday_middleware/response/follow_redirects" in our tests if we're to refer to FaradayMiddleware::RedirectLimitReached because the autoloads at the top are not sufficient.

@iMacTia
Copy link
Member

iMacTia commented Jan 11, 2020

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.

@olleolleolle
Copy link
Member

We have merged #247, which addresses this issue. Thanks for the report, it helps a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants