Running an execute command with rotated as as any entity or player gives the following error:
"An unexpected error occurred trying to execute that command"
/execute rotated as @s run say hi
/execute if entity @s rotated as @s run say hi
will both give that error
/execute unless entity @s[tag=hi] rotated as @e[limit=1] run say hi
will give that error if the executor doesn't have the hi tag