Skip to content

Conversation

@gagik
Copy link
Collaborator

@gagik gagik commented Nov 26, 2025

Thanks @himanshusinghs for catching this; it'd be better to error instead of ignoring these fields.

@gagik gagik requested a review from a team as a code owner November 26, 2025 16:40
Copilot AI review requested due to automatic review settings November 26, 2025 16:40
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR improves error handling for invalid configuration values passed via headers and query parameters. Instead of silently ignoring malformed values, the system now throws explicit errors when values fail schema validation.

Key changes:

  • Enhanced parseConfigValue function to throw detailed error messages when schema validation fails
  • Updated test cases to verify the new error-throwing behavior instead of silent fallback to defaults

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/common/config/configOverrides.ts Modified parseConfigValue to throw validation errors instead of returning undefined
tests/unit/common/config/configOverrides.test.ts Updated test expectations to verify error throwing behavior and removed an unused test line

@coveralls
Copy link
Collaborator

Pull Request Test Coverage Report for Build 19711018550

Details

  • 7 of 7 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.02%) to 80.466%

Totals Coverage Status
Change from base Build 19709029520: 0.02%
Covered Lines: 6669
Relevant Lines: 8204

💛 - Coveralls

@gagik gagik merged commit 2fff1fc into main Nov 26, 2025
19 checks passed
@gagik gagik deleted the gagik/strict-validate branch November 26, 2025 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants