Skip to content

Commit

Permalink
feat(api): improve error msg on workflow import (#5288)
Browse files Browse the repository at this point in the history
  • Loading branch information
yesnault authored Jul 3, 2020
1 parent ee08e26 commit d177c8f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion engine/api/workflow/dao.go
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,7 @@ func checkHooks(db gorp.SqlExecutor, w *sdk.Workflow, n *sdk.Node) error {
h.HookModelID = hm.ID
}
if h.HookModelName == sdk.RepositoryWebHookModelName && (n.Context == nil || n.Context.ApplicationID == 0) {
return sdk.WrapError(sdk.ErrNotFound, "unable to find application for the repository web hook: %d: %s/%s", w.ID, w.Name, n.Name)
return sdk.NewErrorFrom(sdk.ErrWrongRequest, "unable to find application for the repository webhook: %s/%s", w.Name, n.Name)
}

// Add missing default value for hook
Expand Down

0 comments on commit d177c8f

Please sign in to comment.