Open RWOverdijk opened 10 years ago
Update:
My arguments: { '0': 'Rename successful', '1': 250 }
So there are two callback arguments, not one, and neither is an error.
Another update
I'm using this with async.waterfall. So I actually get three arguments, but the third is callback
.
Yeah, some methods pass the callback directly to the "parser code", which actually passes (err, text, statusCode)
(because some methods need to parse the response text and/or check the status code), instead of wrapping the callback and only passing the err
argument.
Unfortunately at this point changing the behavior could break things if other users are relying on those other arguments being passed to their callbacks.
This is just one of those things where waterfall()
can trip you up because some libraries do similar things where they only document the necessary callback arguments.
I'll see what I can do about this without having to break compatibility.
The README states that rename's callback has 1 parameter, being error:
However, I'm getting:
Rename successful
.