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

API Services rejected request with error? HTTP 500 (Internal Server Error) [SOLVED BY ME]

Asked by 4 years ago
Edited 4 years ago

So in my game I have a couple savefiles which a player can save their data to and wipe the data. Whenever the press the reset button to reset a savefile this pops up:

18:25:55.953 - 502: API Services rejected request with error. HTTP 500 (Internal Server Error) 18:25:55.954 - Stack Begin 18:25:55.955 - Script 'ServerScriptService.DataHandler', Line 135 18:25:55.956 - Stack End

This is the script btw

RS.DataController.RemoveData.OnServerEvent:Connect(function(player,desiredSaveFile)
    if not savingData then
        savingData = true
        if desiredSaveFile == "SaveFile1" then
            saveFileToRemove = saveFile1
            print("Resetting Save1")
        elseif desiredSaveFile == "SaveFile2" then
            saveFileToRemove = saveFile2
            print("Resetting Save2")
        else
            saveFileToRemove = saveFile3
            print("Resetting Save3")
        end
        for dataIndex, data in pairs(saveFileToRemove) do
            data:RemoveAsync(player.UserId)
            if dataIndex == "Name" then
                local success, newData = pcall(function()
                    return data:GetAsync(player.UserId)
                end)
                if success and savingData then
        RS.DataController.LoadData:FireClient(player,newData,desiredSaveFile,"Reset")
                    savingData = false
                    break
                end
            end
        end
    end
end)

This line to be precise is line 135

data:RemoveAsync(player.UserId)

Yesterday this code worked normally, but when I tried again today the error message suddenly popped up. Also this error pops up both when I play test in studio and when I enter the game from the roblox website. I can't find any error in my script but there may be. If it is a bug caused by roblox itself then I suppose there is nothing I can do about it.

2 answers

Log in to vote
0
Answered by 4 years ago

Glad you got it working again. For everyone else that is wondering why this happened, adopt me has struck again with their website breaking update, causing the whole website to break. This shut down the API Services.

0
You pretty much just explained everything! + 1 to you DeUltimate23 142 — 4y
0
Everything are good now ogi7yu 0 — 3y
Ad
Log in to vote
0
Answered by
ogi7yu 0
3 years ago

Same thing with my data stores today :(

Answer this question