Lens errors are very common in digital cameras and mostly it is found in a camera that has barrel-style lenses. The main causes due to which lens error occurs are all because of dirt, dust or sands gets deposited inside the lens or if the lens gets out of their place slightly.
Try to clean the lens area and remove the dust or sands. You may use can of compressed air to clean the lens area. You may also use a hairdryer to clean the area where there is no heat risk.
If cleaning the lens area does not work, then you have to check the lens visually. Check whether the lenses are not tilted to one side. Most of the time when the camera gets dropped then the lens may get tilted and it will not work properly. However, it is recommended that you must show professional camera repair centre to fix damaged lenses because fixing this yourself may cause more damage to the camera. Try to fix the lens error by yourself only when you are out of budget. Try to gently push the extracted lens unless it gets straight and no longer crooked or tilted.
If you would like to learn more about lenses you can use the following Learn more about Lenses