I have an old Dewalt 24v battery SDS drill which is fine for my purposes and I bought an aftermarket battery a few years ago which worked fine until I came to charge it after use the other day.
My charger is a DE0245 and the battery error showed as a rapid flashing led on the charger itself.

This battery had been charging fine and then suddenly I get the broken battery indication.
Taking the battery apart the fault was simply a monitoring resistor had a failed solder joint.

The battery has four terminals, two connect directly to the cells, the negative and end terminal have a thermistor connected inhibiting charging if the battery temperature is too high and the middle two connections are for the monitoring resistor.

I replaced the original resistor with a 1.5k one I had to hand and the charger is now happy as is the battery.
I know this is a legacy battery for a defunct drill, but someone may find it of use.