Is Legalising Euthanasia Like Legalising The Death Penalty?

Even though we can all probably think of criminals who deserve the death penalty, we also know that legalising the death penalty is not a good idea because of the risk that innocent people could be killed by mistake. But doesn’t that exact same risk exist if we legalise euthanasia?