diff --git a/ProcessorSurveys.py b/ProcessorSurveys.py index 1a2fc1bfb15e052693551357f09607d9815fdae5..4be38089d804cae6994b2cf55383263af869b635 100644 --- a/ProcessorSurveys.py +++ b/ProcessorSurveys.py @@ -678,12 +678,19 @@ def get_WRSIS_form_as_csv(form_credentials: dict, jobPath: str, config: dict, st try: request = get_from_WRSIS(form_credentials,start_date,end_date) + assert "response" in request.json().keys() except requests.exceptions.RequestException as e: status.reset('WARNING') download_success = False + except AssertionError: + logger.warning(f"WRSIS returned incomplete data:\n{request.json()}") + status.reset('WARNING') + + download_success = False + # define filenames csv_filename = f"SurveyData_raw.csv"