The mistakes you should avoid are to go down too far (can hurt your shoulder) and to use the swinging of your body to go up. If by tricep dips, you mean the ones on the bench, and by chest dips, you mean on the bars, you get a lot more overall muscle stimulation from the bar dips simply from more weight and being able to use your chest in the movement. Personally dips aimed at my chest (wider grip) seem to hurt my shoulders much more than narrower, tricep focused dips. People just hop on the dip bars and start repping away with a lax body, loose grip, shoulders shrugging up and down, and trying to emphasise triceps or chest head over heels.
For chest dips you also use your triceps and a lot of other muscle groups like shoulders etc..
Dips aka the upper body squat, if you can do them without joint pain/discomfort (shoulders, elbows, wrists) go for it, personally they don't feel good on my shoulders due to past issues. That bring said, if you can do chest-focused dips I would imagine they are one of the best excercises for the chest. To increase the focus on the chest you can also put the bars on a further distance. Most people can tolerate much higher volume of bench press vs. dips without shoulder issues.
Any exercise where more mechanical tension can be placed on the target muscle groups and more volume can be performed without undue stress on the joints involved is going to be superior. Dips for sure- just make sure not to add weight too quickly, and use a full range of motion every rep. People complain about dips causing injury but injury usually happens when people venture past the range of motion that they're used to. That is retarded - weighted dips are a fully fledged compound lift with mechanics similar to bench press, yet people rarely realize this and dip away with technique that they'd never do bench press with. If you're doing dips to build the triceps, your torso should be upright and your feet should be below or behind you. Dips are lovely with proper form.
If you're doing dips to build the chest, your torso should be angled forward and your feet should be in front of you. Obviously this pain is only a concern if your form is not causing it.