Improve error handling of server-side rendering.