Skip to content

Improve Invalid Configuration Errors#11

Merged
bbengfort merged 2 commits intomainfrom
cnferr
Mar 21, 2026
Merged

Improve Invalid Configuration Errors#11
bbengfort merged 2 commits intomainfrom
cnferr

Conversation

@bbengfort
Copy link
Copy Markdown
Contributor

@bbengfort bbengfort commented Mar 21, 2026

Scope of changes

Improves the invalid config errors and exports some standard handling for users to define errrors.

Type of change

  • new feature
  • bug fix
  • documentation
  • testing
  • technical debt
  • other (describe)

Author checklist

  • I have manually tested the change and/or added automation in the form of unit tests or integration tests
  • I have added new test fixtures as needed to support added tests

Note

Medium Risk
Renames and reshapes the public validation-error surface (replacing ValidationError/ErrMissingRequiredField with InvalidConfig/ErrMissingRequired) and adds new exported helpers, which can be breaking for downstream callers and changes error-type matching behavior.

Overview
Improves configuration validation error reporting by introducing a new InvalidConfig error type (with helpers Required, Invalid, Parse, and Wrap) and switching validation to emit these field-scoped errors.

Reworks multi-error handling via ValidationErrors and a custom Join that flattens/returns InvalidConfig-based collections while falling back to errors.Join when non-validation errors are mixed in.

Updates the confire convenience API to expose InvalidConfig extraction/checks and re-exports the new error constructors, and adjusts tests accordingly (including moving ParseError into its own file and test).

Written by Cursor Bugbot for commit 2b0062a. Configure here.

@bbengfort bbengfort merged commit d0cdefb into main Mar 21, 2026
4 checks passed
@bbengfort bbengfort deleted the cnferr branch March 21, 2026 19:21
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