[SOLVED] How not to save to the database in beforesave


To respond to a beforeSave request, send a JSON object with the key error or success set.

By returning an error, you will cancel the save request and the object will not be stored in Moralis.

How do I respond to a “beforeSave” request?? This pice of documentation is so badly written or I’m a dumbass not understanding how should I cancel the save to database.

return {key: 'error'}. | { error: true } doesnt seem t work

did you try with throw "Error"; ?

Well that one seem to work :slight_smile: