HTTP 404 (Not Found) When updating player data

My player data saving code was working a few days ago and I haven’t changed it in a long time. However I noticed that my data hasn’t been saving. In my pcall function I printed the error message and it gave me HTTP 404 (Not Found). I couldn’t find anything about this other than one other post which said it was caused by saving data to invalid player id when making a local server with 2 players. I checked user ids of all the players who have played the game using DataStore:ListKeysAsync and I found no negative player ids. I have no idea what is causing this and all the roblox servers appear to be functional.

code and output:

local function SaveData(player)
	if data[player.UserId] then
		local attempt = 0
			attempt += 1
			local success, msg = pcall(function()
				return database:UpdateAsync(player.UserId, function(currentData)
					return data[player.UserId]
			if not success then
		until success or attempt == 5

Does anyone know why this is happening?

Edit: I attempted to view the history of the script to see if I changed anything that could cause this issue. Pressing view script history crashes roblox studio instantly.

Have you tried looking into Error Codes?

I have not looked in to that. But it says error 404 is caused by the ordered data store being removed. I’m not exactly sure what this means and the data store I use isn’t an ordered data store its just a data store

If I remember correctly it’s because you must first :SetAsync() the data once and for subsequent cases you can use UpdateAsync().

I’ll try that but UpdateAsync() worked about a week ago when I last tested

SetAsync() returns the same error. I don’t this this is a problem with UpdateAsync. However, GetAsync() still works as the data is correctly loaded into the game but session data is never saved

Issue has been resolved. I still have no idea what has caused it but restarting my computer and then redownloading roblox studio seems to have done the trick. It appears some of my roblox studio files have been corrupted. Thanks to everyone who tried to help!