- From: Tomasz Pluskiewicz via GitHub <sysbot+gh@w3.org>
- Date: Fri, 11 Jan 2019 13:01:06 +0000
- To: public-hydra-logs@w3.org
Yes, we'd need a `@context`, which would also be define the [other properties](https://tools.ietf.org/html/rfc7807#section-3.1) of the problem details object. Guess that for starters we could publish it under hydra's domain but how would you define RFC 7807 terms? I think I recall talk of similar effort with @dret. Isn't there already an attempt to create JSON-LD profile for problem+json? Or, in more general terms, an RDF vocabulary for the Problem Details spec? The end result could be similar to the following ```json { "@context": [ "http://www.w3.org/ns/hydra/context.jsonld", "http://www.w3.org/ns/hydra/problem+json/context.jsonld", "https://example.com/errors.context" ], "@type": [ "Error", "https://example.com/probs/out-of-credit" ], "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"] } ``` Some things to note: 1. Additional `@context` would be added to define API-specific error details (`balance`) 2. `type` is problematic and would have to be duplicated if one were to also use it as an RDF type. The RFC defines it as `string` and so it cannot be simply redefined as `@type` -- GitHub Notification of comment by tpluscode Please view or discuss this issue at https://github.com/HydraCG/Specifications/issues/178#issuecomment-453509755 using your GitHub account
Received on Friday, 11 January 2019 13:01:12 UTC