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

feat: implement throwOnMaxRedirect option for RedirectHandler #2563

Merged
merged 7 commits into from
Jan 17, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update RedirectHandler.js
Co-authored-by: Carlos Fuentes <me@metcoder.dev>
  • Loading branch information
mertcanaltin and metcoder95 committed Jan 10, 2024
commit 32b7ef359ad88e7a19cf31dad1ddf8cbd560622c
2 changes: 1 addition & 1 deletion lib/handler/RedirectHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@

if (this.opts.throwOnMaxRedirect && this.history.length >= this.maxRedirections) {
if (this.request) {
this.request.abort()
this.request.abort(new Error('max redirects')
}

Check failure on line 98 in lib/handler/RedirectHandler.js

View workflow job for this annotation

GitHub Actions / lint

Parsing error: Unexpected token }

this.redirectionLimitReached = true
metcoder95 marked this conversation as resolved.
Show resolved Hide resolved
this.abort(new Error('max redirects'))
mertcanaltin marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
Loading