Handle errors happen during streaming components#432
Conversation
WalkthroughThe changes in this pull request involve significant enhancements to the error handling and configuration options for server-side rendering in the ReactOnRailsPro module. Key updates include the introduction of new configuration options, improved error handling mechanisms, and modifications to various jobs in the CircleCI configuration. Additionally, several files have been updated to support streaming server rendering, including new methods and error handling capabilities, as well as updates to the changelog documenting these changes. Changes
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (12)
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
a13fe8d to
d563dab
Compare
a19a3ea to
1bb7b9c
Compare
| path.join(__dirname, './fixtures/projects/spec-dummy/220f7a3/server-bundle-web-target.js'), | ||
| ); | ||
| const bundlePath = useTestBundle | ||
| ? '../../../spec/dummy/public/webpack/test/server-bundle.js' |
There was a problem hiding this comment.
I preferred to use the current testing bundle instead of keeping an old version of the bundle, because the old bundle includes an outdated version of the react-on-rails JavaScript package. Consequently, if there are any changes in the latest version of React on Rails, this test will not be aware of them. In follow up PRs, I can update other tests to do the same.
| - package-js-tests: | ||
| requires: | ||
| - install-package-node-packages | ||
| - build-dummy-app-webpack-test-bundles |
There was a problem hiding this comment.
I made the dummy app test bundles be built before running js tests because I added some tests that depend on the dummy bundles as you will see in htmlStreaming.test.js file.
aa5793e to
854f268
Compare
6c88364 to
6b1be1c
Compare
854f268 to
1216862
Compare
6b1be1c to
03feee6
Compare
Summary
Context
There are specific configurations related to error handling in React on Rails:
react_on_rails_pro.throw_js_errors:react-on-railsnode package throws an error if it encounters a rendering issue. The error is propagated to the node renderer, which responds with a 400 status code.<pre>HTML tag and sent to the node renderer. Node renderer will return a successful response (with status code 200), but with a flag indicating that the HTML contains an error.react_on_rails.raise_on_prerender_error:react_on_railsgem raises aPrerenderErrorif the response from the renderer indicates any errors in the HTML.output.mp4
Summary by CodeRabbit
Release Notes
New Features
Bug Fixes
Documentation
Chores