Permalink
Browse files

Adding url to redirect error for better debugging.

  • Loading branch information...
1 parent f462bd3 commit 8a82c5b0990cc58fa4cb7f81814d13ba7ae35453 @mikeal mikeal committed Sep 17, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 main.js
View
2 main.js
@@ -553,7 +553,7 @@ Request.prototype.start = function () {
(self.followRedirect && (self.method !== 'PUT' && self.method !== 'POST' && self.method !== 'DELETE'))) &&
response.headers.location) {
if (self._redirectsFollowed >= self.maxRedirects) {
- self.emit('error', new Error("Exceeded maxRedirects. Probably stuck in a redirect loop."))
+ self.emit('error', new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+self.uri.href))
return
}
self._redirectsFollowed += 1

0 comments on commit 8a82c5b

Please sign in to comment.