diff --git a/src/acl/access-groups.ts b/src/acl/access-groups.ts index bf78337f..63f4dd7a 100644 --- a/src/acl/access-groups.ts +++ b/src/acl/access-groups.ts @@ -258,7 +258,15 @@ export class AccessGroups { } return this.handleDroppedUri(uri, combo, true) } else if (!agent) { - const error = ` Error: Drop fails to drop appropriate thing! ${uri}` + const detectedTypes = Object.keys(this.store.findTypeURIs(thing)) + const typeDetails = detectedTypes.length > 0 + ? `Detected RDF types: ${detectedTypes.join(', ')}` + : 'No RDF type was detected for this URI.' + const error = + `Error: Failed to add access target: ${uri} is not a recognized ACL target type.` + + ` Expected one of: vcard:WebID, vcard:Group, foaf:Person, foaf:Agent, solid:AppProvider, solid:AppProviderClass, or recognized ACL classes.` + + ' Hint: try dropping a WebID profile URI, a vcard:Group URI, or a web app origin.' + + typeDetails debug.error(error) return Promise.reject(new Error(error)) }