Getting error code:101, error: Object not found while saving data to a custom class

I trying to save data in the Tokens class which is a custom class ( with public read write enabled ) by using the following code:

const Tokens = await Moralis.Object.extend(“Tokens”);
tokenObject = new Tokens({…required data });

but I am getting the following error:
code: 101
error: “Object not found.”

what kind of server do you use? is this something that worked before and doesn’t work now, or now is the first time you try?