Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Datastore has DNS errors for only one key?

Asked by
GShocked 150
3 years ago

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)
0
Do you already have a key with your userid? User#30567 0 — 3y
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. GShocked 150 — 3y
0
Did you check my answer? User#30567 0 — 3y
0
see datastore limitations User#30567 0 — 3y

2 answers

Log in to vote
0
Answered by
GShocked 150
3 years ago
Edited 3 years ago

I seemed to have fixed the problem by doing:

PlayersDataStore:SetAsync(UserId, "Test")

Certainly something backend was erroneous.

Ad
Log in to vote
0
Answered by 3 years ago
Edited 3 years ago

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.

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. GShocked 150 — 3y

Answer this question