def METHOD_NAME(field, value, model, e):
    field_props = ModelValidator.get_properties_for_field(model, field)
    # type field from the schema. this can either be a string or list
    # required by JSONSchema, cannot be None
    schema_type_field = field_props["type"]
    try:
        default_value = field_props["default"]
    except KeyError:
        default_value = None
    # If the schema indicates this field is equal to object(if string) or contains object(if list) and
    # the default value isn't set in the schema, set to SQL null, otherwise JSONB columns get
    # set to string 'null'.
    # Other fields can be set to their regular defaults or None.
    if not default_value:
        # if schema_type_field is defined as a list, need to check if 'object' is in list, else check string
        if isinstance(schema_type_field, list) and "object" in schema_type_field:
            default_value = null()  # sql null
        elif schema_type_field == "object":
            default_value = null()  # sql null
    logger.warning(
        f"Validation: Setting the default value {default_value} for field {field} "
        f"of type {schema_type_field} because of error: {e}"
    )
    return default_value