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

Emit error when FormData emits an error event #1336

Closed
wants to merge 3 commits into from
Closed

Conversation

rwky
Copy link
Contributor

@rwky rwky commented Jan 6, 2015

When FormData emits an error event it's not emitted via request, I encountered this when using the Facebook graph API. FormData was emitting an error when the API failed but nothing was catching it.

Catch error from FormData object and emit it as error event.
Fixed variable scope
Conflicts:
	request.js
@simov
Copy link
Member

simov commented Jan 6, 2015

That resolved conflict in the last commit looks kind of scary. Although the only problem might be the use of ; in your code, @rwky , can you start from a clean master branch and apply your changes on top of it?

Also it would be nice to have a test for that.

@nylen
Copy link
Member

nylen commented Jan 6, 2015

👍 to @simov's comments, we want this as a single commit, and it needs tests and a clean build.

What happens now, is an error thrown? After this change, an error would still be thrown if users of request don't handle its error event, right?

Do we want to abort the request when this error occurs?

@rwky
Copy link
Contributor Author

rwky commented Jan 6, 2015

Sorry about that the semi-colons were screwing up the test. I've created a less crappy PR #1341

@rwky rwky closed this Jan 6, 2015
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

3 participants