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

Allow exception data to pass through to the onErrorItem and onCompleteItem callbacks #712

Merged
merged 1 commit into from
Feb 2, 2017

Conversation

JonVisc
Copy link
Contributor

@JonVisc JonVisc commented Jan 27, 2017

Allow the exception reason to pass through to the onErrorItem and onCompleteItem callbacks.

I think it is useful since it allows the client to figure out what could have failed.

I was attempting to add invalid header data. In this case adding an emoji to a header value ("😀") results in e being:

code: 12,
message:"Failed to execute 'setRequestHeader' on 'XMLHttpRequest': '😀' is not a valid HTTP header field value."
name:"SyntaxError"
stack: <removed>

If I could detect code 12 then I'd be able to address it to the user correctly. A very chance of occurring but a chance nonetheless.

Allow the exception reason to pass through to the onErrorItem and onCompleteItem callbacks.
@JonVisc JonVisc changed the title Update FileItem.js Allow Exception to pass through to the onErrorItem and onCompleteItem callbacks Jan 27, 2017
@JonVisc JonVisc changed the title Allow Exception to pass through to the onErrorItem and onCompleteItem callbacks Allow exception data to pass through to the onErrorItem and onCompleteItem callbacks Jan 27, 2017
@nervgh nervgh merged commit 29472ef into nervgh:master Feb 2, 2017
@nervgh
Copy link
Owner

nervgh commented Feb 2, 2017

Thank you!

nervgh added a commit that referenced this pull request Feb 2, 2017
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.

2 participants