Commit d2f31cc
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 ae83ac4 commit d2f31cc
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 | |
|---|---|---|---|
| |||
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
183 | | - | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
184 | 186 | | |
185 | 187 | | |
186 | 188 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
| 213 | + | |
213 | 214 | | |
214 | 215 | | |
215 | 216 | | |
| |||
231 | 232 | | |
232 | 233 | | |
233 | 234 | | |
| 235 | + | |
234 | 236 | | |
235 | 237 | | |
236 | 238 | | |
| |||
243 | 245 | | |
244 | 246 | | |
245 | 247 | | |
| 248 | + | |
246 | 249 | | |
247 | 250 | | |
248 | 251 | | |
| |||
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