linkeddata / rdflib.js

Linked Data API for JavaScript
http://linkeddata.github.io/rdflib.js/doc/
Other
565 stars 143 forks source link

jsonldParser fails to report or handle parse errors #435

Open josephguillaume opened 4 years ago

josephguillaume commented 4 years ago

On error, callback is called (https://github.com/linkeddata/rdflib.js/blob/master/src/jsonldparser.js#L97) but this is actually executeCallback (https://github.com/linkeddata/rdflib.js/blob/master/src/parse.ts#L55), which does not do any error handling (https://github.com/linkeddata/rdflib.js/blob/master/src/parse.ts#L81)

It appears the fix is to simple delete .catch(callback) to allow the error to be caught by executeErrorCallback (https://github.com/linkeddata/rdflib.js/blob/master/src/parse.ts#L66)