When I am going to delete an address from "My Account" address book I am getting error message We can't delete the address right now.
But some other account I can delete the address.
I have checked controller file or delete the address and it's giving an error from the catch.
if ($addressId && $this->_formKeyValidator->validate($this->getRequest())) {
try {
$address = $this->_addressRepository->getById($addressId);
if ($address->getCustomerId() === $this->_getSession()->getCustomerId()) {
$this->_addressRepository->deleteById($addressId);
$this->messageManager->addSuccess(__('You deleted the address.'));
} else {
$this->messageManager->addError(__('We can\'t delete the address right now.'));
}
} catch (\Exception $other) {
$this->messageManager->addException($other, __('We can\'t delete the address right now.'));
}
}
Also in the system log, it's give an error like main.CRITICAL: Exception message: "Street Address" cannot contain more than 1 lines.
Please help me to solve this issue.