Added missing Error Handling in delete.py.