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

Super agent double callback bug #12

Closed
shamblid opened this issue Jan 16, 2019 · 3 comments · May be fixed by #13
Closed

Super agent double callback bug #12

shamblid opened this issue Jan 16, 2019 · 3 comments · May be fixed by #13

Comments

@shamblid
Copy link

In implementing the rest client I ran into this error which may be caused by this snippet of code below. I removed it from my own code and I did not run into the bug again. I am using Node 8 with async/await so I am not using callbacks in the first place.

request.end(function (error, response) {
if (callback) {
var data = null;
if (!error) {
try {
data = _this.deserialize(response, returnType);
if (_this.enableCookies && typeof window === 'undefined') {
_this.agent.saveCookies(response);
}
} catch (err) {
error = err;
}
}
callback(error, data, response);
}
});

@Amit-Patel
Copy link

Hi @shamblid,

Could you direct me on how I can reproduce the double callback bug using async/await?

Thanks,
Amit

@gnongsie
Copy link
Contributor

Hi,

I am closing this issue due to non-activity.

Feel free to open a new issue if there are any doubts.

@acellam
Copy link

acellam commented May 17, 2023

This issue was fixed but it has been re-introduced again in the latest released changes

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