Code 19 seems to be a generic electrical trouble code, as I had it come up and a search here and on ADV shows a few others with the issue. In none of those cases was it actually sidestand switch related.
In my particular case, the bike was running fine and starting fine. Due to mileage, I had the valves checked and a new plug installed. and immediately afterwards the code showed up. The bike would not start with the error code displayed but it would crank over. If I cycled the key 5-10 times eventually the code would clear and once it cleared, the bike would start with no problem. Once it would start, it ran great and never stalled or missed.
I spent an inordinate amount of time trying to figure out the issue. Ultimately, I replaced the 'new' plug with another plug and the problem went away (it has since stayed away for the past month and 1000+ miles).
In my case, then, the plug was the issue. I'd suggest you start by double checking the connections, then replacing it. It is kind of hard to seat the plug wire on the plug, I think; I use a appropriately sized socket and hold it over the plug connection and seat it with a sharp rap from a mallet.