502: API Services rejected request with error. HTTP 0 (HTTP 403)

Today I started getting 502 error when I was trying to load data everything was working fine 10 minutes ago.
image

local Module = {};

local ServerStorage = game:GetService("ServerStorage")

function Module:Load(plr,folder,GDS,key)

    local Success,Data = pcall(GDS.GetAsync,GDS,key..plr.UserId);
    
    if not (Success) then
		print(Data)
        plr.DataLoaded.Value = false;
        return;
    end

	if (Data == nil) then
        plr.DataLoaded.Value = true;
        return;
	end
    
    if (Success) then
        plr.DataLoaded.Value = true;
        for i,v in next,Data do
            if (folder:FindFirstChild(v.name)) then
                folder:FindFirstChild(v.name).Value = v.value;
            else
                warn(v.name.." is not valid member of "..folder.Name);
            end
        end
    end
end

function Module:Save(folder)
    local Data = {};
    for i,v in next,folder:GetChildren() do
        local TempData = {
            name = v.Name;
            value = v.Value;
        };
        table.insert(Data,TempData);
    end

    return Data;
end

return Module;
3 Likes

Is studio access to api services enabled ?

Yes, it is enabled :confused: .

I’ve had the same issue before; This mostly happens during weekends, don’t know why. :confused:

1 Like

Data stores and studio were never a good match even with that setting… Just test it in a real game.

Studios really inconsistent. Sometimes it works, sometimes it doesn’t with data stores.

1 Like

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


If I login to my main account DevOfLua

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

3 Likes

(post withdrawn by author, will be automatically deleted in 1 hour unless flagged)

After working on some Datastore related things over teamcreate @Leolol_DB started to get this error. Might be a connection between Datastores and teamcreate.

In other words, I can reproduce this error.

1 Like