Skip to content
This repository was archived by the owner on May 30, 2024. It is now read-only.

Fix to handle an error in FindDeploymentStatusByID #433

Merged
merged 1 commit into from
May 12, 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
2 changes: 2 additions & 0 deletions internal/pkg/store/deploymentstatus.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ func (s *Store) FindDeploymentStatusByID(ctx context.Context, id int) (*ent.Depl
Only(ctx)
if ent.IsNotFound(err) {
return nil, e.NewError(e.ErrorCodeEntityNotFound, err)
} else if err != nil {
return nil, e.NewErrorWithMessage(e.ErrorCodeInternalError, "Failed to find deployment status.", err)
}

return ds, nil
Expand Down