Improves delete functionality error handling and responses