EBISPOT / gwas-sumstats-service

Summary statistics service
2 stars 0 forks source link

Avoid json decode error if validation output josn is empty #268

Open jdhayhurst opened 1 year ago

jdhayhurst commented 1 year ago

It is possible for the json output file (from the validation process) to have not been written before the job is terminated by the LSF/Nextflow. When evaluating these json outputs (https://github.com/EBISPOT/gwas-sumstats-service/blob/68ae30e88d238ea7d287e4d5773f0d6b6e83e3d5/sumstats_service/resources/api_utils.py#L163) if the json is empty, it throws an error:

json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

This causes the validation to hang, so we should write something to handle (ignore) this error.

jdhayhurst commented 1 year ago

this is an issue