Hops warnings component level (CPython)

Hey @stevebaer. I’ll give an example of what I am trying to do and put a flow chart of the current and desired process:

TL;DR: It would be good if there was a way to validate inputs based on definition requirements beyond the min/max, domain range and tree access settings within the get parameters for hops, and then be able to control the response body based on that validation.

Example
I have a definition that creates a series of points on a surface, using the evaluate surface command. It returns the point tree. I only ever want to have it work for strictly planar surfaces.

If feed it a surface argument, it is technically valid as per the evaluate surface component logic. What I need is a planar check before hand to see if the surface argument is planar or not. If it is, evaluate the rest of the definition and return the result. If not, return an empty result and populate the warning body of the response body.

The equivalent in code would be:

public ResponseBody MyFunction(Surface surface, List<ValueSet> valueSetList){
    var responseBody = new ResponseBody();
    if(surface.IsPlanar()){
        values = new List<Point3d>();
        vectors = new List<Vector3d>();
        for(ValueSet valueSet in valueSetList){
            surface.Evaluate(value_set.u, value_set.v, 1, values, vectors);
        }
        responseBody.Values = values;
    else{
        responseBody.Values = new DataTree();
        responseBody.Warnings.Add("Surface is not planar");
    }
    return responseBody;
}

Here is a flow chart of the current and desired solution: