gbv / cocoda

A web-based tool for creating mappings between knowledge organization systems.
https://coli-conc.gbv.de/cocoda/
MIT License
39 stars 5 forks source link

Detect malformed config file #352

Closed nichtich closed 5 years ago

nichtich commented 5 years ago

If the config file (cocoda.json by default) is malformed JSON, it is ignored. An error message should be shown instead.

stefandesu commented 5 years ago

There should be an error on the JavaScript console, and I don't think there needs to be a user-facing error for this.

We can additionally add an error to the build script when cocoda.json exists but is not valid JSON.

stefandesu commented 5 years ago

A malformed user config will now be detected in the build script. Currently, the build will not be interrupted, but continued with the branch config or an empty user config. If necessary, I can change this so the build fails if the config file is malformed.

stefandesu commented 5 years ago

The build is now canceled if the user config is malformed. Also, Cocoda will show an error message if a malformed config is loaded: https://coli-conc.gbv.de/cocoda/dev/?config=test.json