Skip to content

Commit 9e1ef47

Browse files
authored
Merge branch 'main' into fix/form-date-year
2 parents 3ddbff8 + 0179738 commit 9e1ef47

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/acl/access-groups.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,15 @@ export class AccessGroups {
258258
}
259259
return this.handleDroppedUri(uri, combo, true)
260260
} else if (!agent) {
261-
const error = ` Error: Drop fails to drop appropriate thing! ${uri}`
261+
const detectedTypes = Object.keys(this.store.findTypeURIs(thing))
262+
const typeDetails = detectedTypes.length > 0
263+
? `Detected RDF types: ${detectedTypes.join(', ')}`
264+
: 'No RDF type was detected for this URI.'
265+
const error =
266+
`Error: Failed to add access target: ${uri} is not a recognized ACL target type.` +
267+
` Expected one of: vcard:WebID, vcard:Group, foaf:Person, foaf:Agent, solid:AppProvider, solid:AppProviderClass, or recognized ACL classes.` +
268+
' Hint: try dropping a WebID profile URI, a vcard:Group URI, or a web app origin.' +
269+
typeDetails
262270
debug.error(error)
263271
return Promise.reject(new Error(error))
264272
}

0 commit comments

Comments
 (0)