When I create a space and create a rule on that space to "Execute a script", then try to delete that space selecting the top radio button "This space and all its contents. Note: Rules will also be deleted.", I get an error message "Unable to delete Space due to system error:". This only seems to happen when the rule on the space is to execute a script and doesn't matter whether the rule is applied to sub-spaces or not or whether or not there is any content in that space when you try to delete it. I tried it with the "Add aspect" rule only and was able to delete it fine, but I'm not sure if there are other rules that it does happen on.
I could not repro this on v2.2.0, but can on v2.2.1