Electrosynthesis of HCl?
You've described the classic preparation of sodium hypochlorite, better known as "bleach".

If you electrolyze sodium chloride solution, you form hydrogen at one electrode and chlorine at the other, and sodium hydroxide in solution. But chlorine tends to dissolve in alkaline solutions to form chloride and hypochlorite ions. So you get "sodium hypochlorite" solution, which is actually a complex equilibrium between sodium chloride, sodium hydroxide, sodium hypochlorite, free chlorine, and (of course) water.