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
Do you already have a key with your userid?
see https://developer.roblox.com/en-us/articles/Datastore-Errors
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.
Did you check my answer?
see datastore limitations