From d74978820bc27885849fa15b3a878c81ab42cd77 Mon Sep 17 00:00:00 2001 From: noah Date: Thu, 12 May 2022 21:50:56 +0900 Subject: [PATCH] Fix to handle an internal error --- internal/pkg/store/deploymentstatus.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/pkg/store/deploymentstatus.go b/internal/pkg/store/deploymentstatus.go index bc6b96d9..4a66058c 100644 --- a/internal/pkg/store/deploymentstatus.go +++ b/internal/pkg/store/deploymentstatus.go @@ -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