Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Datastore has DNS errors for only one key?

I have a datastore that holds player data. For some reason, when I try to :GetAsync the data for my user ID, it returns error 502 DnsResolve. When I try to :GetAsync the data for any other user ID, it works perfectly fine.

local DataStoreService = game:GetService("DataStoreService")
local PlayersDataStore = DataStoreService:GetDataStore("Players")
local Success, PlayerData = pcall(function()
	return PlayersDataStore:GetAsync(0) --Where I store my player data template
end)
print(Success, PlayerData)
--true table: 0x001b6d8bf2866b07

local Success, PlayerData = pcall(function()
	return PlayersDataStore:GetAsync(UserId) --Only my user ID fails??
end)
print(Success, PlayerData)
--true 502: API Services rejected request with error. HTTP unknown error (HttpError: DnsResolve)

5 comments

0

Do you already have a key with your userid?

0

Yes, I already have a key with my userid. Even if I didn't, it would return nil. The wiki you linked to is not helpful for this particular error.

0

Did you check my answer?

0

see datastore limitations

2 answers

https://devforum.roblox.com/t/502-api-services-rejected-request-with-error-http-0-http-403/270575

So I noticed something 20 minutes ago i was on my main account DevOfLua this error only appears when the game owner isn’t testing it in the studio as you can see in this picture I am on my ALT CorePackages and it throws 502 error

Error Image

If I login to my main account DevOfLua

Error Image 2

Datastore works fine, so I guess this is team create issue.

1 comment

0

I don't use Team Create and error 502 has many causes. The linked forum post mentions an HTTP 403 error as the cause, while mine is a DNS resolve error.

I seemed to have fixed the problem by doing:

PlayersDataStore:SetAsync(UserId, "Test")

Certainly something backend was erroneous.

This discussion is preserved as it was. New answers, comments, and votes are closed.