nodeSolidServer / nodeSolidServer/node-solid-server
Blank nodes cause 500 response ("Error translating between RDF formats") when requesting JSON-LD
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- JavaScript
- Sterne
- 1.8k
- Forks
- 308
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Issue: When attempting to request a JSON-LD serialisation (via "Accept:application/ld+json" header) of a turtle document which includes one or more blank nodes, a 500 error is generated. An equivalent document where the blank node is replaced with a URI-identified node returns JSON-LD just fine.
Solid Version: Running on Solid 5.2.4 (current version on https://solid.community)
Expected outcome: Valid JSON-LD should be returned whether or not blank nodes are included (serialising any blank nodes as JSON objects without "@id", according to the JSON-LD spec).
Steps to reproduce
# 1: document without bnode, requested as turtle
$ http get https://musicog.solid.community/public/without_bnode.ttl
HTTP/1.1 200 OK
Content-Type: text/turtle
# ...
<http://example.com/testSubject1> <http://example.com/testPredicate><http://example.com/testSubject2> .
<http://example.com/testSubject2> <http://example.com/testPredicate2> "Example" .
# 2: document without bnode, requested as JSON-LD
$ http get https://musicog.solid.community/public/without_bnode.ttl Accept:application/ld+json
HTTP/1.1 200 OK
Content-Type: application/ld+json; charset=utf-8
# ...
[
{
"@id": "http://example.com/testSubject1",
"http://example.com/testPredicate": [
{
"@id": "http://example.com/testSubject2"
}
]
},
{
"@id": "http://example.com/testSubject2",
"http://example.com/testPredicate2": [
{
"@value": "Example"
}
]
}
]
# 3: document with bnode, requested as turtle
$ http get https://musicog.solid.community/public/with-bnode.ttl
HTTP/1.1 200 OK
Content-Type: text/turtle
# ...
<http://example.com/testSubject> <http://example.com/testPredicate> [ <http://example.com/testPredicate2> "Example" ] .
# 4: document with bnode, requested as JSON-LD -> 500 error!
$ http get https://musicog.solid.community/public/with-bnode.ttl Accept:application/ld+json
HTTP/1.1 500 Internal Server Error
Content-Type: text/plain; charset=utf-8
# ...
Error translating between RDF formats
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Führe die beiden Requests gegen with-bnode.ttl und without_bnode.ttl mit Accept:application/ld+json aus und vergleiche die Antworten. Verfolge den RDF-to-JSON-LD-Übersetzungspfad des Servers ausgehend vom fehlschlagenden Request. Erledigt ist die Aufgabe, wenn das Dokument mit Blank Nodes gültiges JSON-LD zurückgibt, wobei Blank Nodes als Objekte ohne @id dargestellt werden, statt mit einer 500-Antwort zu scheitern.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript
- Bereich
- api, backend
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 42/100