Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jsonldParser fails to report or handle parse errors #435

Open
josephguillaume opened this issue Aug 9, 2020 · 0 comments
Open

jsonldParser fails to report or handle parse errors #435

josephguillaume opened this issue Aug 9, 2020 · 0 comments

Comments

@josephguillaume
Copy link

josephguillaume commented Aug 9, 2020

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant