Flow network response information to "parse error" use cases. #2469

Closed
NTaylorMullen opened this Issue Aug 27, 2013 · 4 comments

Projects

None yet

4 participants

@NTaylorMullen

When a parse error occurs from reading a network response chances are it's a network related issue. Therefore we should flow through network related information to the error handler so that users can handle the errors appropriately.

@davidfowl
Member

@DamianEdwards I think we can just add an .xhr property on the relevant error object. What do you think?

@NTaylorMullen

What about the cases where we have parse failures where there is no XHR request? Do we just want to ignore these situations and not pass any network related information to the error handler?

It's very unlikely for any other non-ajax related transports to throw parse failures due to the network since they're all long running. I'm O.K. with not passing any data for those, @davidfowl what do you think?

@DamianEdwards
Member

What network information would we pass if there's no xhr? The source property can still be set to whatever root exception caused the issue.

@NTaylorMullen NTaylorMullen added a commit that referenced this issue Sep 3, 2013
@NTaylorMullen NTaylorMullen Added a context member to the error object.
- The context member is to provide additional information that can help identify the cause of an error.

#2469
fcf0a53
@NTaylorMullen NTaylorMullen added a commit that referenced this issue Sep 3, 2013
@NTaylorMullen NTaylorMullen Expanded on the response redirection facts to check that a context me…
…mber is passed on the error object.

#2469
5a02081
@NTaylorMullen NTaylorMullen added a commit that referenced this issue Sep 4, 2013
@NTaylorMullen NTaylorMullen Addressed code review comments.
- Also added extra context to errors where it made sense.

#2469
4fcd17c
@NTaylorMullen NTaylorMullen added a commit that referenced this issue Sep 5, 2013
@NTaylorMullen NTaylorMullen Added a context member to the error object.
- The context member is to provide additional information that can help identify the cause of an error.

#2469
2ab02ce
@NTaylorMullen NTaylorMullen added a commit that referenced this issue Sep 5, 2013
@NTaylorMullen NTaylorMullen Expanded on the response redirection facts to check that a context me…
…mber is passed on the error object.

#2469
d31fd2f
@NTaylorMullen NTaylorMullen added a commit that referenced this issue Sep 5, 2013
@NTaylorMullen NTaylorMullen Addressed code review comments.
- Also added extra context to errors where it made sense.

#2469
4ab2594
@gustavo-armenta

tested there is an error.context.responseText

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