MCPcopy Index your code
hub / github.com/github/gh-aw / Error

Method Error

pkg/workflow/workflow_errors.go:344–359  ·  view source on GitHub ↗

Error implements the error interface. Returns an informational message explaining that the file is a redirect placeholder and telling the user how to resolve it.

()

Source from the content-addressed store, hash-verified

342// Returns an informational message explaining that the file is a redirect placeholder
343// and telling the user how to resolve it.
344func (e *RedirectOnlyWorkflowError) Error() string {
345 filename := filepath.Base(e.Path)
346
347 msg := fmt.Sprintf(
348 "Redirect-only workflow detected: %s\n\n"+
349 "This workflow file is a redirect placeholder and is missing the 'on' trigger field.\n"+
350 "The redirect was not resolved to the full workflow content during download.\n\n",
351 filename,
352 )
353 if e.Target != "" {
354 msg += fmt.Sprintf("This workflow redirects to: %s\n\n", e.Target)
355 }
356 msg += "Run 'gh aw update' to follow the redirect and get the full workflow.\n\n" +
357 "Skipping compilation."
358 return msg
359}

Callers 3

printCompilationErrorFunction · 0.95
compileWorkflowFileFunction · 0.95
TestRedirectOnlyWorkflowFunction · 0.95

Calls

no outgoing calls

Tested by 1

TestRedirectOnlyWorkflowFunction · 0.76