Commit cbb2ccc
fix: node-renderer diagnostic improvements (#3086)
## Summary
- Add `credentials` to the sensitive-key filtering test (every other key
in `SENSITIVE_REQUEST_BODY_KEYS` already had coverage)
- Exclude `renderingRequest` from diagnostic `bodyKeys` output — it's
already reported via the `Received type:` line, so showing it again is
redundant
- Document that `renderer_http_keep_alive_timeout` should be set shorter
than the node renderer's server-side idle timeout to prevent
stale-connection errors
Fixes #3075
## Test plan
- [x] Node renderer `worker.test.ts` passes (verified locally)
- [x] RuboCop passes on `configuration.rb`
- [ ] CI green
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Low Risk**
> Low risk: changes are limited to error-message diagnostics/test
coverage in the Node renderer and comment-only documentation for a Rails
config option.
>
> **Overview**
> **Node renderer diagnostics are tightened for malformed
`renderingRequest` requests.** The invalid-request message now omits the
`renderingRequest` key from the reported `bodyKeys` list (it’s already
described via `Received type:`), and tests assert this behavior.
>
> **Sensitive key filtering coverage is expanded.** Tests add
`Credentials` to ensure case-insensitive filtering matches
`SENSITIVE_REQUEST_BODY_KEYS`.
>
> **Rails config docs are clarified.**
`renderer_http_keep_alive_timeout` is now documented to be set slightly
shorter than the node renderer’s server-side idle timeout to avoid
stale-connection reuse errors (and to use HTTPX defaults when `nil`).
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
f01cd0f. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Bug Fixes**
* Improved error message clarity for invalid render requests by
excluding internal keys from diagnostic output.
* **Documentation**
* Enhanced configuration documentation for HTTP keep-alive timeout
settings with recommended values and risk mitigation guidance.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 8106127 commit cbb2ccc
3 files changed
Lines changed: 11 additions & 1 deletion
File tree
- packages/react-on-rails-pro-node-renderer
- src
- tests
- react_on_rails_pro/lib/react_on_rails_pro
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
190 | | - | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
191 | 193 | | |
192 | 194 | | |
193 | 195 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
| 219 | + | |
219 | 220 | | |
220 | 221 | | |
221 | 222 | | |
| |||
237 | 238 | | |
238 | 239 | | |
239 | 240 | | |
| 241 | + | |
240 | 242 | | |
241 | 243 | | |
242 | 244 | | |
| |||
249 | 251 | | |
250 | 252 | | |
251 | 253 | | |
| 254 | + | |
252 | 255 | | |
253 | 256 | | |
254 | 257 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
98 | 103 | | |
99 | 104 | | |
100 | 105 | | |
| |||
0 commit comments