bugfix: allow federation sources to fail #575
Test case:
- Code
<sib-display
data-src="sources.jsonld"
fields="username"
></sib-display>
- Data
// sources.jsonld
{
"@id": "sources.jsonld",
"@type": "ldp:Container",
"ldp:contains": [
{
"federation": "users",
"@id": "users-paris.jsonld", // change it to "test" to make it fail
"@type": "ldp:Container"
},
{
"federation": "users",
"@id": "users-nantes.jsonld",
"@type": "ldp:Container"
}
],
"@context": "https://cdn.happy-dev.fr/owl/hdcontext.jsonld"
}
// users-paris.jsonld
{
"@id": "users-paris.jsonld",
"@type": "ldp:Container",
"ldp:contains": [
{
"@id": "https://api.test-paris.happy-dev.fr/users/alex_b/",
"username": "User 1 from Paris"
},
{
"@id": "https://api.test-paris.happy-dev.fr/users/alex_paris_hd/circles/",
"username": "User 2 from Paris"
}
],
"@context": "https://cdn.happy-dev.fr/owl/hdcontext.jsonld"
}
// users-nantes.jsonld
{
"@id": "users-nantes.jsonld",
"@type": "ldp:Container",
"ldp:contains": [
{
"@id": "https://api.test-nantes.happy-dev.fr/users/alex_b/",
"username": "User 1 from Nantes"
},
{
"@id": "https://api.test-nantes.happy-dev.fr/users/alex_nantes_hd/circles/",
"username": "User 2 from Nantes"
}
],
"@context": "https://cdn.happy-dev.fr/owl/hdcontext.jsonld"
}
When you load the first time, you should see 4 users, from Paris and Nantes.
Change the @id
of one container in sources.jsonld
. You'll get a 404, but you should still be able to see 2 users from the other container