Skip to content

Commit 9da7768

Browse files
committed
Put URL at end of messages.
1 parent 6025a7b commit 9da7768

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

lib/ContextResolver.js

+7-5
Original file line numberDiff line numberDiff line change
@@ -171,21 +171,23 @@ module.exports = class ContextResolver {
171171
}
172172
} catch(e) {
173173
throw new JsonLdError(
174-
`Dereferencing the URL "${url}" did not result in a valid JSON-LD ` +
175-
'object. Possible causes are an inaccessible URL perhaps due to ' +
174+
'Dereferencing a URL did not result in a valid JSON-LD object. ' +
175+
'Possible causes are an inaccessible URL perhaps due to ' +
176176
'a same-origin policy (ensure the server uses CORS if you are ' +
177177
'using client-side JavaScript), too many redirects, a ' +
178178
'non-JSON response, or more than one HTTP Link Header was ' +
179-
'provided for a remote context.',
179+
'provided for a remote context. ' +
180+
`URL: "${url}".`,
180181
'jsonld.InvalidUrl',
181182
{code: 'loading remote context failed', url, cause: e});
182183
}
183184

184185
// ensure ctx is an object
185186
if(!_isObject(context)) {
186187
throw new JsonLdError(
187-
`Dereferencing the URL "${url}" did not result in a JSON object. ` +
188-
'The response was valid JSON, but it was not a JSON object.',
188+
'Dereferencing a URL did not result in a JSON object. The ' +
189+
'response was valid JSON, but it was not a JSON object. ' +
190+
`URL: "${url}".`,
189191
'jsonld.InvalidUrl', {code: 'invalid remote context', url});
190192
}
191193

0 commit comments

Comments
 (0)