BadRequestException: endpoint not applicable in the database type 'sharedb' in CloudKit Dashboard when viewing records of a share accepted

When I query for all the records of a certain record type, and then I click on the record name to view the record, I get this error at the bottom of the window pane that shows the details of the specific record:

BadRequestException: endpoint not applicable in the database type 'sharedb'

What is "endpoint" referring, what does it mean and what is causing this error message?

Here is the part of the schema that defines the two record types involved:

    RECORD TYPE Group (
        "___createTime" TIMESTAMP,
        "___createdBy"  REFERENCE,
        "___etag"       STRING,
        "___modTime"    TIMESTAMP,
        "___modifiedBy" REFERENCE,
        "___recordID"   REFERENCE QUERYABLE,
        debugTag        STRING QUERYABLE SEARCHABLE SORTABLE,
        groupData       BYTES,
        GRANT WRITE TO "_creator",
        GRANT CREATE TO "_icloud",
        GRANT READ TO "_world"
    );

    RECORD TYPE LocalGroupIdentifier (
        "___createTime"      TIMESTAMP,
        "___createdBy"       REFERENCE,
        "___etag"            STRING,
        "___modTime"         TIMESTAMP,
        "___modifiedBy"      REFERENCE,
        "___recordID"        REFERENCE QUERYABLE,
        groupReference       REFERENCE,
        localGroupIdentifier STRING QUERYABLE SEARCHABLE,
        GRANT WRITE TO "_creator",
        GRANT CREATE TO "_icloud",
        GRANT READ TO "_world"
    );

The error comes when I view the details of a record of type Group.

I use UICloudSharingController and CKModifyRecordsOperation as Apple Documentation shows in the Apple Documentation for UICloudSharingController and Sample Code: Sharing CloudKit Data with Other iCloud Users. It works just fine when I create the CKShare object. When I use the url to accept the share, it works fine except for the error in question, which shows when I view the record of type Group and the record of type LocalGroupIdentifier, which has a reference to the record of type Group. I use exactly one record of type Group and one record of type LocalGroupIdentifier.

I used two different simulators with different Apple IDs for sharing and for accepting the share. They are both iPhone 8 with iOS 15.4. The share I create is in the private database, and the share accepted is in the shared database.

BadRequestException: endpoint not applicable in the database type 'sharedb' in CloudKit Dashboard when viewing records of a share accepted
 
 
Q