make sure config dict is not jsonified if it contains an error