Currently any issues with the pelias.json file cause the config code to output a very unclear error message that looks like this:
throw new Error( 'failed to merge config from path:' + path );
It doesn't give any indication that the problem is with the config file's syntax and definitely doesn't provide hints at the part of the file that has the syntax issue. There are many ways to validate JSON, surely we can bring one in and use it to create friendly error messages.
Currently any issues with the
pelias.jsonfile cause the config code to output a very unclear error message that looks like this:It doesn't give any indication that the problem is with the config file's syntax and definitely doesn't provide hints at the part of the file that has the syntax issue. There are many ways to validate JSON, surely we can bring one in and use it to create friendly error messages.