DNS Validation Error Invalid TTL Code 1004 & 9021 on API (also Desktop & Mobile)


It seems like similar has been reported (can’t link because I’m a new forum user it won’t let me) but those are closed without resolution and there is no ability to add to the conversation over there.

As far as you know this is a mobile problem - it’s not, I have the same error when updating via. API and also on Desktop.

Also, it appears that these problems were first reported on here 2 1/2 months ago.

Mobile: Same as what’s reported by the others.

Desktop: If the browser Window is narrow enough, it automatically changes to the mobile-optimised view and the same problem as Mobile happens. Tested on Edge and Chrome.

API: Here is my script:

It was working great before.

Now I get this response:
{"success":false,"errors":[{"code":1004,"message":"DNS Validation Error","error_chain":[{"code":9021,"message":"Invalid TTL. Must be between 120 and 2,147,483,647 seconds, or 1 for automatic"}]}],"messages":[],"result":null}

API is more important to me. I had a lot of issues today because my IP changed and my script failed to update the IP because of this error.

Has anyone got any hints to get around this problem via. API?

That is not so much of a new problem and the issue on the desktop is also simply because you made it render as mobile view. So, desktop still works :wink:

As for the API call, that does not work for the same reason as why it does not work in the Cloudflare UI. The TTL value is specified as string whereas it should be an integer.

Thank you sandro for the quick reply.
Yes I just picked up my error 40 minutes after you.

By having my TTL variable in as a string, the request being sent as “120” in quotation marks rather than 120 without. Note that the API must have been changed to care about that because previously it accepted it like that.

This makes me think that perhaps Cloudflare team has made the same error as I did when coding the mobile view of the web interface?

I disagree that it’s not 100% not desktop issue, because I had the Cloudflare desktop site open in Google Chrome on Windows 10 but snapped to the side of my 1440x900 screen, which unwittingly put me into “mobile version” without even knowing that I even was on the mobile version. Same on Microsoft Edge on Windows 10. This led to a lot of downtime/time and frustration in even trying to get the record updated manually.

Thats what I was referring to :slight_smile:

Most likely.

I get your point, but you still loaded the mobile view, even if just implicitly. The desktop view does not have that issue.

That bug has been around for quite a while now, so I think it is time for a fix :smile:

Yup :smiley: I just got really unlucky by 1. Having my script fail due to my error previously being accepted 2. Logging in via. Mobile to fix manually didn’t work 3. Logging in via. Desktop using Google Chrome didn’t work. 4. Logging in via. Desktop using Microsoft Edge didn’t work. and then by chance trying again with a full Desktop window I finally go it to work. I would have been up and running an hour sooner if the problem was fixed at Step 2 :wink:

Sure, thats why my comment on a fix being due at this point :slight_smile:

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