Skip to content

Conversation

@KevLehman
Copy link
Member

@KevLehman KevLehman commented Oct 8, 2025

Proposed changes (including videos or screenshots)

Issue(s)

https://rocketchat.atlassian.net/browse/CORE-1501
This helps to understand why a validation error happened.

Steps to test or reproduce

Further comments

Summary by CodeRabbit

  • New Features
    • Error reports now include richer context during validation failures to aid troubleshooting: query parameters are attached for query validation errors, body parameters are included for body validation errors, and the original response body is captured for response validation errors.
    • Only relevant fields are included to keep logs clear and focused.
    • No changes to app behavior or public API; these updates solely improve the clarity and usefulness of error logs.

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Oct 8, 2025

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is targeting the wrong base branch. It should target 7.12.0, but it targets 7.11.0

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link

changeset-bot bot commented Oct 8, 2025

⚠️ No Changeset found

Latest commit: 9749e5c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 8, 2025

Walkthrough

Logging fields were added to error reports in Router.ts for validation failures. Query validation now logs queryParams and sets bodyParams undefined; body validation logs bodyParams and sets queryParams undefined; response validation logs originalResponse body. No control flow or public API changes.

Changes

Cohort / File(s) Summary of Changes
Router logging updates
packages/http-router/src/Router.ts
Augmented error reporting payloads: differentiated inclusion of queryParams, bodyParams, and originalResponse depending on validation failure branch (query/body/response). No logic or API modifications.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I thump the logs with gentle might,
Tagging queries left and right;
Bodies here, and queries there—
Responses caught mid‑air.
Ears up high, I track the trail,
So every nibble leaves a tale. 🐇✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title clearly and concisely describes the main change of logging request and response contents when validation errors occur, which matches the detailed modifications to error reporting in the pull request.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/log-htt

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link

codecov bot commented Oct 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.36%. Comparing base (085d653) to head (9749e5c).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #37170      +/-   ##
===========================================
- Coverage    67.39%   67.36%   -0.04%     
===========================================
  Files         3287     3287              
  Lines       111684   111684              
  Branches     20409    20405       -4     
===========================================
- Hits         75270    75233      -37     
- Misses       33730    33765      +35     
- Partials      2684     2686       +2     
Flag Coverage Δ
e2e 57.27% <ø> (-0.01%) ⬇️
unit 71.38% <100.00%> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@KevLehman KevLehman marked this pull request as ready for review October 8, 2025 15:35
@KevLehman KevLehman requested a review from sampaiodiego October 8, 2025 15:35
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between c31e428 and 32b07b1.

📒 Files selected for processing (1)
  • packages/http-router/src/Router.ts (3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: 📦 Meteor Build - coverage
🔇 Additional comments (1)
packages/http-router/src/Router.ts (1)

267-267: Verify test-only logging is sufficient for response validation.

Logging the full response body is appropriate here since response validation only runs in test mode (per line 255). This mitigates the security concerns that apply to request payload logging.

However, verify that test environments do not contain production or production-like sensitive data that could still be exposed in test logs.

@sampaiodiego sampaiodiego added the stat: QA assured Means it has been tested and approved by a company insider label Oct 8, 2025
@sampaiodiego sampaiodiego added this to the 7.12.0 milestone Oct 8, 2025
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Oct 8, 2025
@ggazzo ggazzo removed the stat: QA assured Means it has been tested and approved by a company insider label Oct 8, 2025
@dionisio-bot dionisio-bot bot removed the stat: ready to merge PR tested and approved waiting for merge label Oct 8, 2025
@KevLehman KevLehman added the stat: QA assured Means it has been tested and approved by a company insider label Oct 9, 2025
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Oct 9, 2025
@kodiakhq kodiakhq bot merged commit 6b9b1d1 into develop Oct 9, 2025
88 of 90 checks passed
@kodiakhq kodiakhq bot deleted the chore/log-htt branch October 9, 2025 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants