Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

GetLaunchPlan checks for NotFound gRPC code rather than nil launchplan #441

Merged
merged 1 commit into from
Jun 6, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pkg/controller/nodes/subworkflow/launchplan/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,11 @@ func (a *adminLaunchPlanExecutor) GetLaunchPlan(ctx context.Context, launchPlanR

lp, err := a.adminClient.GetLaunchPlan(ctx, &getObjectRequest)
if err != nil {
if status.Code(err) == codes.NotFound {
return nil, errors.Wrapf(RemoteErrorNotFound, err, "No launch plan retrieved from Admin")
}
return nil, errors.Wrapf(RemoteErrorSystem, err, "Could not fetch launch plan definition from Admin")
}
if lp == nil {
return nil, errors.Wrapf(RemoteErrorNotFound, err, "No launch plan retrieved from Admin")
}

return lp, nil
}
Expand Down