diff --git a/internal/grpc/services/ocminvitemanager/ocminvitemanager.go b/internal/grpc/services/ocminvitemanager/ocminvitemanager.go index 0474c3cae8..e3fc61fc34 100644 --- a/internal/grpc/services/ocminvitemanager/ocminvitemanager.go +++ b/internal/grpc/services/ocminvitemanager/ocminvitemanager.go @@ -234,7 +234,7 @@ func getOCMEndpoint(originProvider *ocmprovider.ProviderInfo) (string, error) { func (s *service) AcceptInvite(ctx context.Context, req *invitepb.AcceptInviteRequest) (*invitepb.AcceptInviteResponse, error) { token, err := s.repo.GetToken(ctx, req.InviteToken.Token) if err != nil { - if errors.Is(err, ocmd.ErrTokenInvalid) { + if errors.Is(err, invite.ErrTokenNotFound) { return &invitepb.AcceptInviteResponse{ Status: status.NewInvalid(ctx, "token invalid or not found"), }, nil diff --git a/tests/integration/grpc/ocm_invitation_test.go b/tests/integration/grpc/ocm_invitation_test.go index 1427963ba6..fe8a78e59a 100644 --- a/tests/integration/grpc/ocm_invitation_test.go +++ b/tests/integration/grpc/ocm_invitation_test.go @@ -262,7 +262,7 @@ var _ = Describe("ocm invitation workflow", func() { }) }) - Describe("marie accept a not existing token", func() { + Describe("marie accept a non existing token", func() { var cleanup func() BeforeEach(func() { variables, cleanup, err = initData(driver, nil, nil) @@ -276,7 +276,7 @@ var _ = Describe("ocm invitation workflow", func() { It("will not complete the invitation workflow", func() { forwardRes, err := cesnetgw.ForwardInvite(ctxMarie, &invitepb.ForwardInviteRequest{ InviteToken: &invitepb.InviteToken{ - Token: "not-existing-token", + Token: "non-existing-token", }, OriginSystemProvider: cernbox, })