Handle errors in patient delete queries