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

Warn if formData hash values are not strings, to prevent source.on is not a function #321

Closed
nhooey opened this issue Feb 4, 2017 · 12 comments
Assignees

Comments

@nhooey
Copy link

nhooey commented Feb 4, 2017

In request/request#1495, the example code gets an error like source.on is not a function because one of the values in the formData has for a request or request-promise options hash is not a string.

The form-data module should detect this error and tell the user to ensure all formdata hash values are strings, or writeStreams, or whatever else is valid.

@alexindigo
Copy link
Member

Yeah, looks like legit issue. Do you mind to create a PR? Thank you

@nhooey
Copy link
Author

nhooey commented Jun 13, 2017

@alexindigo That was four months ago. I'm not using the library anymore...

@alexindigo
Copy link
Member

Ok. I'll close this issue then. :) Thanks.

@nhooey
Copy link
Author

nhooey commented Jun 13, 2017

Why would you close an issue without a solution?

@alexindigo
Copy link
Member

You said, you're no longer interested in this issue. So it was logical to close it.
Please let me know if/when you want to get back to it. Thank you.

@nhooey
Copy link
Author

nhooey commented Jun 13, 2017

I meant that I can't really make a pull request for it.

It's still an issue potentially to a lot of people, even if they don't complain about it. It's an instance where the code doesn't check its inputs, which is a defect.

@nhooey
Copy link
Author

nhooey commented Jun 13, 2017

I'd suggest leaving it open so we can track the defect.

@alexindigo
Copy link
Member

Ok.

@alexindigo alexindigo reopened this Jun 13, 2017
@nhooey
Copy link
Author

nhooey commented Jun 13, 2017

Thanks @alexindigo!

@DylanPiercey
Copy link
Member

I'll take a look at this when we do #137.

@DylanPiercey DylanPiercey self-assigned this Jul 15, 2017
@DylanPiercey
Copy link
Member

Closing as a duplicate of #137.
Work is being done in #362.

@DylanPiercey DylanPiercey marked this as a duplicate of #137 Jul 15, 2017
@DylanPiercey
Copy link
Member

Also, specifically for converting objects to use formdata syntax see q-flat.

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

No branches or pull requests

3 participants