(response: dict)
return errors
Searches response from DHIS2 for import errors, and returns a
    dictionary of {jsonpath: error message}
Searches response from DHIS2 for import errors, and returns a
    dictionary of {jsonpath: error message}
Searches response from DHIS2 for import errors and returns a dictionary of { jsonpath : error message }
def get_errors(response: dict) -> dict:
    """
    Searches response from DHIS2 for import errors, and returns a
    dictionary of {jsonpath: error message}
    """
    if "response" in response:
        response = response["response"]

    errors = get_entity_errors(response)
    errors.update(get_enrollments_errors(response))
    errors.update(get_events_errors(response))
    return errors
def get_errors ( response : dict ) -> dict : if "response" in response : response = response [ "response" ] errors = get_entity_errors ( response ) errors . update ( get_enrollments_errors ( response ) ) errors . update ( get_events_errors ( response ) ) return errors