Skip to content

Commit

Permalink
fix: Correct error handling in Delete function (#6269)
Browse files Browse the repository at this point in the history
  • Loading branch information
pingsutw authored Feb 25, 2025
1 parent 49a2dd6 commit 8fc1a30
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion flyteplugins/go/tasks/plugins/webapi/agent/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,10 @@ func (p *Plugin) Delete(ctx context.Context, taskCtx webapi.DeleteContext) error
ResourceMeta: metadata.AgentResourceMeta,
}
_, err = client.DeleteTask(finalCtx, request)
return fmt.Errorf("failed to delete task from agent with %v", err)
if err != nil {
return fmt.Errorf("failed to delete task from agent with %v", err)
}
return nil
}

func (p *Plugin) Status(ctx context.Context, taskCtx webapi.StatusContext) (phase core.PhaseInfo, err error) {
Expand Down

0 comments on commit 8fc1a30

Please sign in to comment.