diff --git a/pkg/controller/handlers/knowledge/knowledge.go b/pkg/controller/handlers/knowledge/knowledge.go index 9e5be329..aca98a97 100644 --- a/pkg/controller/handlers/knowledge/knowledge.go +++ b/pkg/controller/handlers/knowledge/knowledge.go @@ -180,9 +180,10 @@ func (a *Handler) IngestKnowledge(req router.Request, resp router.Response) erro return fmt.Errorf("failed to create knowledge metadata file: %w", err) } } else { + var notFoundErr *gptscript.NotFoundInWorkspaceError if err := a.gptscript.DeleteFileInWorkspace(req.Ctx, ".knowignore", gptscript.DeleteFileInWorkspaceOptions{ WorkspaceID: ws.Status.WorkspaceID, - }); err != nil { + }); err != nil && !errors.As(err, ¬FoundErr) { return fmt.Errorf("failed to delete ignore file: %w", err) } }