Do and don’ts when mounting through-holes LEDs, app note from Vishay. Link here (PDF)
Through-hole LED cases usually consist of epoxy casting compounds with duroplastic properties. It is in the nature of things that optical semiconductor devices require transparent materials with the best possible optical features. Unlike standard IC mold compounds, which use reinforcing fillers like class fibers to achieve better mechanical stability, these optical materials must not be filled. In addition, due to the very small component dimensions, the wall thickness of the casted resin body is also small. All this results in some special aspects regarding mechanical stability during the soldering process to be considered for the processing of leaded LEDs.