Skip to content
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/acl/access-groups.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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. ' +
Comment thread
timea-solid marked this conversation as resolved.
Outdated
Comment thread
timea-solid marked this conversation as resolved.
Outdated
typeDetails
Comment thread
timea-solid marked this conversation as resolved.
Outdated
debug.error(error)
return Promise.reject(new Error(error))
}
Expand Down