A frequent misinterpretation is that God changes His immutable holy nature to match human sinfulness, becoming impure or vengeful in a petty way with the wicked, which undermines His perfect purity; instead, the verse uses poetic parallelism to describe God's just response that reflects back the disposition of the person, or another error sees it as endorsing moral relativism where truth depends on one's perspective rather than God's absolute standards.
II Samuel 22:26
King James Version (1769)
26 With the merciful thou wilt shew thyself merciful, and with the upright man thou wilt shew thyself upright.
This verse captures the principle of divine reciprocity, where God responds to individuals in a manner consistent with their own character and attitude toward Him; to the pure-hearted who approach Him with integrity and faithfulness, He reveals Himself as pure, gracious, and merciful, while to the froward or perverse who act with deceit and hostility, He shows Himself shrewd and adversarial, upholding justice by countering wickedness without altering His inherent holiness.