Skip to content

Commit

Permalink
Add back empty response check
Browse files Browse the repository at this point in the history
  • Loading branch information
MDrakos committed Nov 6, 2024
1 parent e30cf43 commit d2a7df3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/platform/model/checkpoints.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (

"github.com/ActiveState/cli/internal/constants"
"github.com/ActiveState/cli/internal/errs"
"github.com/ActiveState/cli/internal/locale"
"github.com/ActiveState/cli/internal/logging"
"github.com/ActiveState/cli/pkg/platform/api/graphql"
gqlModel "github.com/ActiveState/cli/pkg/platform/api/graphql/model"
Expand Down Expand Up @@ -108,6 +109,10 @@ func FetchCheckpointForCommit(commitID strfmt.UUID, auth *authentication.Auth) (

logging.Debug("Returning %d requirements", len(response))

if len(response) == 0 {
return nil, locale.WrapError(ErrNoData, "err_no_data_found")
}

return response, nil
}

Expand Down

0 comments on commit d2a7df3

Please sign in to comment.