-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
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.
% curl -I https://apidg.gent.be/opendata/adlib2eventstream/v1/context/generiek-basis.jsonld | grep Cache
Cache-Control: public, max-age=86400
Cache-control: private
The context file should be cached, does this module support that?
Metadata
Metadata
Assignees
Labels
No labels