MCPcopy Create free account
hub / github.com/conforma/cli / createErrorResult

Function createErrorResult

cmd/validate/vsa.go:1847–1856  ·  view source on GitHub ↗

createErrorResult creates a ComponentResult with an error

(component app.SnapshotComponent, err error)

Source from the content-addressed store, hash-verified

1845
1846// createErrorResult creates a ComponentResult with an error
1847func createErrorResult(component app.SnapshotComponent, err error) vsa.ComponentResult {
1848 // Create ValidationResult from error for proper display
1849 errorResult := createValidationResultFromError(err)
1850 return vsa.ComponentResult{
1851 ComponentName: component.Name,
1852 ImageRef: component.ContainerImage,
1853 Result: errorResult,
1854 Error: err,
1855 }
1856}
1857
1858// createValidationResultFromError creates a ValidationResult from an error
1859// This ensures proper display of VSA status even when validation fails

Callers 3

handleComponentFallbackFunction · 0.85
TestCreateErrorResultFunction · 0.85

Calls 1

Tested by 1

TestCreateErrorResultFunction · 0.68