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

problem: how to send 500 if a component throws an exception #25

Open
jedwards1211 opened this issue Nov 1, 2016 · 4 comments
Open

problem: how to send 500 if a component throws an exception #25

jedwards1211 opened this issue Nov 1, 2016 · 4 comments

Comments

@jedwards1211
Copy link

I'm not sure I fully understand this yet, but if I do, then by the time react-dom-stream gets to a component that throws an error, a status code of 200 has already been written to the response header and it's impossible to send a 500 if an error occurs.

Is this an intractable problem? Maybe you know how other streaming servers deal with this, I don't.

@jedwards1211
Copy link
Author

@jedwards1211
Copy link
Author

http://engineering.pivotal.io/post/http-trailers/
I'll look into making a PR for this

@dmitry
Copy link

dmitry commented Nov 4, 2016

As I know it at least doesn't work in Firefox.

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Trailer tells it's supported in all the major browsers.

@jedwards1211
Copy link
Author

@dmitry so I was confused by that article into thinking that X-Streaming-Error was a sort of standard, but obviously it's not because I can't find it anywhere else on the web. Chrome certainly didn't show any error message when I sent it in a trailer. If only status code were a header, then it would be so easy...

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

2 participants