Skip to content
This repository was archived by the owner on Jun 22, 2023. It is now read-only.

json-ld: Raise custom error if json file for output configuration is missing #180

Closed
alastair opened this issue Apr 11, 2021 · 0 comments · Fixed by #182
Closed

json-ld: Raise custom error if json file for output configuration is missing #180

alastair opened this issue Apr 11, 2021 · 0 comments · Fixed by #182
Assignees

Comments

@alastair
Copy link
Member

We have a test to try and load a config from a mapping file:

const config = require(`./jsonld/${type}.json`)
if (!config) {
throw new Error(`JSON LD not supported for type "${type}"`)
}

however the require will fail with an exception if the file is missing and we don't get our custom "JSON LD not supported for type" error message

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant