- From: Tomasz Pluskiewicz via GitHub <sysbot+gh@w3.org>
- Date: Wed, 11 Nov 2020 19:11:24 +0000
- To: public-hydra-logs@w3.org
Following the discussion between myself, @alien-mcl and @serialseb, here's an example of how an Hydra error response could look like (context inlined)
```
{
"@context": {
"hydra": "http://www.w3.org/ns/hydra/core#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"type": "@type",
"title": "rdfs:label",
"detail": "rdfs:comment",
"status": "hydra:statusCode",
"instance": {
"@id": "rdfs:seeAlso",
"@type": "@id"
}
},
"@type": "hydra:Error",
"type": "https://example.com/probs/out-of-credit",
"title": "You do not have enough credit.",
"detail": "Your current balance is 30, but that costs 50.",
"instance": "/account/12345/msgs/abc",
"balance": 30,
"accounts": [
"/account/12345",
"/account/67890"
]
}
```
1. `rdfs` used in place of hydra terms to make the context more useful to non-Hydra uses
2. `hydra:Error` can be placed in the response body. Mixing `@type` and `type` appears totally fine for JSON-LD parsing
--
GitHub Notification of comment by tpluscode
Please view or discuss this issue at https://github.com/HydraCG/Specifications/pull/218#issuecomment-725607635 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 11 November 2020 19:11:26 UTC