Skip to content

Separate async error from original error in onError handling #204

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

Merged
merged 1 commit into from
Sep 26, 2017

Conversation

jordan-brough
Copy link
Contributor

@jordan-brough jordan-brough commented Sep 25, 2017

The original error needs to be kept separately from any potential errors that
might occur while processing the onError hooks.

This was already done in one place where err2 was being used.

If all onError callbacks complete successfully then async.eachSeries calls its
callback without an error value.

One way to repro this problem is to set up a beforeRequest hook that sets
request.url = null. Artillery then errors in a spot where it tries to access
the original error but actually accesses the non-existent async error.

NOTE: It does seem like something ought to pay attention to any async errors. That
might be good to tackle in a separate PR though?

The original error needs to be kept separately from any potential errors that
might occur while processing the onError hooks.

This was already done in one place where `err2` was being used.

If all onError callbacks complete successfully then `async.eachSeries` calls its
callback without an error value.

One way to repro this problem is to set up a `beforeRequest` hook that sets
`request.url = null`.  Artillery then errors in a spot where it tries to access
the original error but actually accesses the non-existent async error.
@hassy hassy merged commit c7e17d0 into artilleryio:master Sep 26, 2017
@hassy
Copy link
Member

hassy commented Sep 26, 2017

Good catch, thanks @jordan-brough

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

Successfully merging this pull request may close these issues.

None yet

2 participants