You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When consuming an LDES I sometimes run into this error: Failed to load remote context
2023-01-17T20:23:45.067Z [EventStream] info: 200 https://apidg.gent.be/opendata/adlib2eventstream/v1/hva/objecten?generatedAtTime=2023-01-06T18:44:49.883Z (840) ms
node:events:505
throw er; // Unhandled 'error' event
^
ErrorCoded: Failed to load remote context https://apidg.gent.be/opendata/adlib2eventstream/v1/context/generiek-basis.jsonld: request to https://apidg.gent.be/opendata/adlib2eventstream/v1/context/generiek-basis.jsonld failed, reason: socket hang up
at ContextParser.load (/usr/src/build/node_modules/jsonld-context-parser/lib/ContextParser.js:705:19)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Promise.all (index 4)
at async ContextParser.parse (/usr/src/build/node_modules/jsonld-context-parser/lib/ContextParser.js:595:30)
at async EntryHandlerKeywordContext.handle (/usr/src/build/node_modules/jsonld-streaming-parser/lib/entryhandler/keyword/EntryHandlerKeywordContext.js:33:46)
at async JsonLdParser.newOnValueJob (/usr/src/build/node_modules/jsonld-streaming-parser/lib/JsonLdParser.js:194:21)
at async JsonLdParser.executeBufferedJobs (/usr/src/build/node_modules/jsonld-streaming-parser/lib/JsonLdParser.js:400:21)
Emitted 'error' event on JsonLdParser instance at:
at JsonLdParser.onerror (/usr/src/build/node_modules/readable-stream/lib/internal/streams/readable.js:720:14)
at JsonLdParser.emit (node:events:527:28)
at emitErrorNT (/usr/src/build/node_modules/readable-stream/lib/internal/streams/destroy.js:150:8)
at emitErrorCloseNT (/usr/src/build/node_modules/readable-stream/lib/internal/streams/destroy.js:113:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
code: 'loading remote context failed'
}
Probably the server caused the socket hang up but the error isn't handled.
It's this module that throws the error but the problem is likely higher in the stack.
The socket hangup is probably a server issue, for which you should attach an error-listener to the stream.
Currently, this tool doesn't support context caching, but this is something that could be achieved by passing your own document loader. Definitely open to a PR that enables context caching though :-)
When consuming an LDES I sometimes run into this error:
Failed to load remote context
Probably the server caused the
socket hang up
but the error isn't handled.It's this module that throws the error but the problem is likely higher in the stack.
The context file should be cached, does this module support that?
The text was updated successfully, but these errors were encountered: