はったり is a bluff, often in a game or negotiation, emphasizing deception; こけおどし focuses more on the hollowness of the threat itself.
Etymology
Compound of こけ (from 虚仮, meaning 'foolish' or 'empty') and おどし (from 脅し, 'threat'). The exact derivation is uncertain, but the word has been used since at least the Edo period.