jsonschema can get crash during failure of curl creating empty file

https://gitlab.com/sylva-projects/sylva-core/-/blob/main/tools/validation/helm-schema-validation.sh?ref_type=heads#L45

During running curl command and creating file for output:

If the network drops or the URL returns a 404, curl -s will still exit with status code 0, masking the failure and leaving an empty file.

This causes jsonschema to crash.