It's likely that your oven, even on the coolest setting, is too hot. That's why the onion burnt, and the bitterness comes from the burnt bits.
I occasionally use my electric oven for dehydrating fruit and veg but mine goes down to 50°C. I tend to preheat it to about 100°C and turn it down when the food had been in for a few minutes, at which point I open the door as well.
A gas oven has another problem - burning gas produces water vapour, which makes drying harder even with ventilation (you really do need the door ajar to let the steam out). Drying on a rack (borrowed from a grill pan, or a cake cooling rack) makes a huge difference.
I also have a dehydrator, but it's not all that much better than the oven for a small batch in winter, so I leave it stored away except when I've got a lot to dry. It wins on capacity and the fact I can run it outside - worthwhile for chillies and presumably onions.