Entrapment is a defense that we can use in some criminal cases. New York Penal Code 40.05 says it is against the law for law enforcement officers and public servants to commit entrapment.
By contrast, a sting is a completely legal way for law enforcement to try to catch criminals. And on the surface, a sting does not look that much different from entrapment.
Both are often used in drug and prostitution cases, as well as in firearms cases.
What is the difference?