Type Error: RHS expression

I did a quick search of the forum and didn’t see this error, so I figured I’d report it here.

When creating a DNS (NEW) policy, and adding a domain for “Allow”, after clicking Save and reviewing the list, I see the following error message:

Type Error: RHS expression (example.com) is a string but it should be Set. The policy may not behave as expected.

Can you post a screenshot of the rule? It’s ok to black out the domain name(s).

EDIT Reveiwing my screen shot compared to what you posted, I noticed the “in” vs “is” Operator. Perhaps “in” is the correct operator? I changed to “in” and I no longer see the error.EDIT

Sure; I just used example.com; first the error:

Then the rule; note I don’t see any error when editing or creating the policy:

I can’t replicate that. Can you open a ticket and post the # here? From the email address associated with your account, email them at: support AT cloudflare DOT com

That’s weird. The only reason I have “In” is because I have several domains to Allow.

1 Like

I have this issue also. just testing atm. Need to block sites so kids will do school work in lock down.

Also when you have more then one condition if you delete the top condition the bottom one deletes?

I have this error as well.

Just started in the last week or so. When I attempt to add any domain policy, this error happens. It seems to self-correct after a while of messing around, allowing me to add to the policy without the error.

How did you get it to work without error and does the block/allow actually work?

It’s hit or miss. Sometimes the error goes away on create, sometimes it doesn’t. No idea how to reproduce success.

The better way to work around this in the meantime is to configure a whitelist and/or a blacklist. If you use the “in” operator you can specify multiple (or just one) domains in a single policy. This does work and it does block/allow. See example below.

1 Like

Thank you

Something is really going on.
I just changed two perfectly working rules (just changed name to be more descriptive) and got same error after save.

Both are very basic rules, “Domain is aws.amazon.com
(as a new user, I am unable to put two screenshots in one post)
What is going on?

Thanks justanotherd00d76.
Using “In” in policy solved my problem also.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.