onaio / fhir-tooling

A command line utility to support FHIR Core content authoring
Other
1 stars 1 forks source link

validateFhir command fails for non json files #133

Closed Wambere closed 4 months ago

Wambere commented 5 months ago

When the validateFhir command tries to validate any non json file it fails with the error

org.json.JSONException: A JSONObject text must begin with '{' at 1 [character 2 line 1]
    at org.json.JSONTokener.syntaxError(JSONTokener.java:497)
    at org.json.JSONObject.<init>(JSONObject.java:208)
    at org.json.JSONObject.<init>(JSONObject.java:404)
    at org.smartregister.command.ValidateFhirResourcesCommand.isConfigFile(ValidateFhirResourcesCommand.java:148)
    at 

For example see link

Instead of failing, this should just skip that file and continue