Skip to content

Conversation

@Nivl
Copy link

@Nivl Nivl commented Jan 17, 2026

Most methods for parameter errors were not setting ParameterName, causing the field to be empty most of the time.

This PR fixes this by making sure that ParameterName is always set for a parameter ValidationError.

Copilot AI review requested due to automatic review settings January 17, 2026 07:07
Copy link

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 fixes a bug where the ParameterName field in ValidationError was not being set by most parameter error methods, causing it to be empty. The fix ensures that all parameter validation error functions now correctly populate the ParameterName field with param.Name.

Changes:

  • Added ParameterName: param.Name to 28 parameter error functions in errors/parameter_errors.go
  • Added corresponding test assertions to verify ParameterName is correctly set in all affected test cases

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
errors/parameter_errors.go Added ParameterName field assignment to 28 parameter validation error functions that were missing it
errors/parameter_errors_test.go Added 40 test assertions to verify ParameterName is correctly populated in all affected validation error tests

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link

codecov bot commented Jan 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.60%. Comparing base (cadff75) to head (50ae3fe).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #218      +/-   ##
==========================================
+ Coverage   97.58%   97.60%   +0.01%     
==========================================
  Files          56       56              
  Lines        5176     5209      +33     
==========================================
+ Hits         5051     5084      +33     
  Misses        125      125              
Flag Coverage Δ
unittests 97.60% <100.00%> (+0.01%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant