Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

fix: changelist not found error (#8592)

Danny Xu9410f45fc214
diff --git a/backend/api/v1/changelist_service.go b/backend/api/v1/changelist_service.go
index 99eca09f26..7320016693 100644
--- a/backend/api/v1/changelist_service.go
+++ b/backend/api/v1/changelist_service.go
@@ -89,13 +89,16 @@ func (s *ChangelistService) GetChangelist(ctx context.Context, request *v1pb.Get
return nil, status.Errorf(codes.Internal, err.Error())
}
if project == nil {
- return nil, status.Errorf(codes.NotFound, "project %q not found", request.Name)
+ return nil, status.Errorf(codes.NotFound, "project %q not found", projectID)
}
changelist, err := s.store.GetChangelist(ctx, &store.FindChangelistMessage{ProjectID: &project.ResourceID, ResourceID: &changelistID})
if err != nil {
return nil, err
}
+ if changelist == nil {
+ return nil, status.Errorf(codes.NotFound, "changelist %q not found", changelistID)
+ }
v1Changelist, err := s.convertStoreChangelist(ctx, changelist)
if err != nil {
return nil, err