Portable charger and UPS

Hi guys, Recently I had carried by portable charger to my friends place. Had to charge from the socket available , apparently the adapter etc fit in the socket. But the socket was connected to UPS i.e lighting line of electric connection and not the AH line. So on the incident of per cut the UPS notified overload and I immediately Ran to disconnect my Ather charger. It happened twice on the same day.

Does this leads to spoilage of UPS battery ? Or the improper function of the UPS can be because of my Ather charging?

Kindly shed some gyan on issue and also suggest if charging is advisable on lighting line linked to UPS or better to draw out from AH.