MCPcopy Create free account
hub / github.com/github/gh-aw / NewValidationError

Function NewValidationError

pkg/workflow/workflow_errors.go:81–95  ·  view source on GitHub ↗

NewValidationError creates a new validation error with context

(field, value, reason, suggestion string)

Source from the content-addressed store, hash-verified

79
80// NewValidationError creates a new validation error with context
81func NewValidationError(field, value, reason, suggestion string) *WorkflowValidationError {
82 if errorHelpersLog.Enabled() {
83 errorHelpersLog.Printf("Creating validation error: field=%s, reason=%s", field, reason)
84 }
85 severity, category := classifyValidationSeverity(field, reason)
86 return &WorkflowValidationError{
87 Field: field,
88 Value: value,
89 Reason: reason,
90 Suggestion: suggestion,
91 Severity: severity,
92 Category: category,
93 Timestamp: time.Now(),
94 }
95}
96
97// OperationError represents an error that occurred during an operation
98type OperationError struct {

Callers 15

validateWorkflowInputsFunction · 0.92
TestValidationErrorFunction · 0.70
validateUvPackagesMethod · 0.70
validateStringPropertyFunction · 0.70
validateMCPRequirementsFunction · 0.70
validateStrictNetworkMethod · 0.70
validateStrictToolsMethod · 0.70

Calls 3

EnabledMethod · 0.45
PrintfMethod · 0.45