Hi @wenjie24 and welcome to the forum 🙂.
It looks like you create your own application, right?
If you don't receive any error message the first thing that comes to my mind are trigger functions.
Do you have any trigger functions that fires on "DELETE"? If so the RETURN value should not be NEW.