So all Jessie Pinkman's got to do is ask the under cover police if it's okay to sell them meth and then they can't be arrested for it?
Entrapment is reserved for the police going above and beyond, eg "sell me meth or I'll kill your dog" where it can be argued that the entrapped normally would not do the crime.
Apparently there is “entrapment by estoppel” in which a government official tells you an act is legal when it isn’t. They have to be acting as a representative of the government, though; undercover cops wouldn’t count.
I still wouldn’t be very excited to try this defense in court.
Don't you know the other rule of drug dealing? If you ask an undercover cop if they're an undercover cop, they have to tell you the truth? it's against the rules for them to lie about it.