Skip to content

Refactor parameter validation to use specific error variants #58

@coderabbitai

Description

@coderabbitai

Context

During code review of PR #57, it was identified that the parameter parsing logic incorrectly uses ParseError::MissingColon for empty parameter names and types, which is semantically inaccurate.

Suggestion

Add specific error variants to improve error reporting clarity:

  • ParseError::EmptyParameterName for parameters with empty names
  • ParseError::EmptyParameterType for parameters with empty types

This would replace the current practice of using ParseError::MissingColon for these distinct validation errors.

Benefits

  • More precise error reporting
  • Clearer semantic meaning of error variants
  • Better diagnostic messages for users

References

Requested by: @leynos

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions