In order to fix this kind of problem, you may first check and ensure that the SIM card pin connector is cleaned, an oxidation build up may also caused sim card error problem on the device.
If the pins seems all cleaned and not damaged, refer to this simple solution below and do some tracing and check up procedure.
Nokia 1508 SIM Card Connection Line Paths- jumper ways solution
First trace each of the following pin connection line paths, like the VSIM, Ground, Clock, Reset and Data connection. The pins were all connected to a five pin filter IC, these IC is a diode used for ESD and EMI protection. You may check the said filter IC and or replace if necessary. The other components such as the resistor and capacitor were used for bypass and for SIM supply voltage filtering. You may also check and replace those particular components for possible damaged.
You can also apply a jumper solution, even without or the SIM filter is removed.
In some severely damaged device like wet damaged or heavily dropped, some cases the problem lies on the main IC, (power and processor IC). By reworking or replacing it may only fix the SIM card error problem.