The JSON loader does not handle JSON exceptions when loading, how to reproduce the error (tested on environs 9.3.1, latest on pipy at the moment):
from environs import Env
import os
os.environ['TEST_JSON'] = 'test'
env = Env()
env.json('TEST_JSON')
Error message:
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Whereas I would expect a more descriptive error like in the other parsers:
environs.EnvValidationError: Environment variable "TEST_JSON" invalid: Not a valid boolean.
The JSON loader does not handle JSON exceptions when loading, how to reproduce the error (tested on environs 9.3.1, latest on pipy at the moment):
Error message:
Whereas I would expect a more descriptive error like in the other parsers:
environs.EnvValidationError: Environment variable "TEST_JSON" invalid: Not a valid boolean.