Skip to content

Commit d177c8f

Browse files
authored
feat(api): improve error msg on workflow import (#5288)
1 parent ee08e26 commit d177c8f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

engine/api/workflow/dao.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,7 @@ func checkHooks(db gorp.SqlExecutor, w *sdk.Workflow, n *sdk.Node) error {
842842
h.HookModelID = hm.ID
843843
}
844844
if h.HookModelName == sdk.RepositoryWebHookModelName && (n.Context == nil || n.Context.ApplicationID == 0) {
845-
return sdk.WrapError(sdk.ErrNotFound, "unable to find application for the repository web hook: %d: %s/%s", w.ID, w.Name, n.Name)
845+
return sdk.NewErrorFrom(sdk.ErrWrongRequest, "unable to find application for the repository webhook: %s/%s", w.Name, n.Name)
846846
}
847847

848848
// Add missing default value for hook

0 commit comments

Comments
 (0)