diff --git a/CHANGELOG.md b/CHANGELOG.md index e2a84a1d..9b1bff2e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # jsonld ChangeLog +## 8.3.2 - xxxx-xx-xx + +### Added +- Added URL to context resolution error message. + ## 8.3.1 - 2023-09-06 ### Fixed diff --git a/lib/ContextResolver.js b/lib/ContextResolver.js index e70ba98a..10877b7c 100644 --- a/lib/ContextResolver.js +++ b/lib/ContextResolver.js @@ -171,8 +171,8 @@ module.exports = class ContextResolver { } } catch(e) { throw new JsonLdError( - 'Dereferencing a URL did not result in a valid JSON-LD object. ' + - 'Possible causes are an inaccessible URL perhaps due to ' + + `Dereferencing the URL "${url}" did not result in a valid JSON-LD ` + + 'object. Possible causes are an inaccessible URL perhaps due to ' + 'a same-origin policy (ensure the server uses CORS if you are ' + 'using client-side JavaScript), too many redirects, a ' + 'non-JSON response, or more than one HTTP Link Header was ' + @@ -184,8 +184,8 @@ module.exports = class ContextResolver { // ensure ctx is an object if(!_isObject(context)) { throw new JsonLdError( - 'Dereferencing a URL did not result in a JSON object. The ' + - 'response was valid JSON, but it was not a JSON object.', + `Dereferencing the URL "${url}" did not result in a JSON object. ` + + 'The response was valid JSON, but it was not a JSON object.', 'jsonld.InvalidUrl', {code: 'invalid remote context', url}); }