Skip to content

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

Merged
nervgh merged 1 commit into
nervgh:masterfrom
JonVisc:master
Feb 2, 2017
Merged

nervgh merged 1 commit into
nervgh:masterfrom
JonVisc:master

Conversation

@JonVisc

@JonVisc JonVisc commented Jan 27, 2017

Copy link
Copy Markdown
Contributor

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 Jan 27, 2017
@JonVisc JonVisc changed the title Allow Exception to pass through to the onErrorItem and onCompleteItem callbacks Jan 27, 2017
@nervgh
nervgh merged commit 29472ef into nervgh:master Feb 2, 2017
@nervgh

nervgh commented Feb 2, 2017

Copy link
Copy Markdown
Owner

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

2 participants