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

Invalid URL or request options will fail silently and hang request #512

Closed
Limess opened this issue Aug 7, 2018 · 1 comment · Fixed by #695
Closed

Invalid URL or request options will fail silently and hang request #512

Limess opened this issue Aug 7, 2018 · 1 comment · Fixed by #695

Comments

@Limess
Copy link

Limess commented Aug 7, 2018

My colleague had issues where they were adding headers to a CSV file, which led to the request URL being populated as url (the string). This led to request returning an error.

Normally, this would have been handled as expected by Artillery, but in this event, request doesn't emit an error event, instead it only calls the provided callback function, see the below for a discussion on adding documentation for this:

request/request#1779

This means that either the error is completely unhandled (if maybeCallback is undefined), or caught but then ignored: https://github.com/shoreditch-ops/artillery/blob/fb681c16d7c799e1788d2eba1f84bd0f90525294/core/lib/engine_http.js#L304-L307.

The solution is to always have a callback function on this line: https://github.com/shoreditch-ops/artillery/blob/fb681c16d7c799e1788d2eba1f84bd0f90525294/core/lib/engine_http.js#L437 and to handle any errors here, rather than in the stream (or alternatively check if the callback has been called in the stream and handle errors there as well).

@hassy
Copy link
Member

hassy commented Aug 16, 2018

Great bug report, thanks @Limess!

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

Successfully merging a pull request may close this issue.

2 participants