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

Support server error #16

Closed
igoldny opened this issue May 16, 2016 · 2 comments
Closed

Support server error #16

igoldny opened this issue May 16, 2016 · 2 comments

Comments

@igoldny
Copy link

igoldny commented May 16, 2016

currently when server render happens whether if it is was successful or not it will render then page with response status 200, but what if one of the promises failed? we should have the ability to catch it and return server error.

loadOnServer({ ...renderProps, store }).then(() => { SUCCESS }).catch(() => { FAILURE })

@AVVS
Copy link
Member

AVVS commented May 16, 2016

You can perform check based on the store state in the current implementation, I can probably add "error" to topmost state, so that if key is undefined for the promise that failed you could still see it. As for the then/catch it would really be a breaking change and I don't see how useful it can be. Generally the error should've populated your state and your router should've reacted to it by redirecting and rendering an appropriate page

@igoldny
Copy link
Author

igoldny commented May 17, 2016

Sounds good, thnx

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