Classify resolved configuration mistakes as input errors

This commit is contained in:
2026-12-02 19:34:13 +00:00
parent adf4dc87e0
commit 21d4eebb5e
7 changed files with 121 additions and 9 deletions

View File

@@ -0,0 +1,14 @@
package config
import "fmt"
// DomainInputError identifies a rejected value or relation in completed
// configuration. Environmental failures retain their ordinary error types.
type DomainInputError struct{ cause error }
func (e *DomainInputError) Error() string { return e.cause.Error() }
func (e *DomainInputError) Unwrap() error { return e.cause }
func domainInputErrorf(format string, args ...any) error {
return &DomainInputError{cause: fmt.Errorf(format, args...)}
}