When using the activeDocument save as function, it works with RGB 8 and 16 bit. It seems to error (no error found or displayed in logs etc) when it is a 32bit. Interestingly if I save it as 32bit using PS itself and reopen it, it has become an 8-bit.
IS there a flag or a method I could use to convert 32bit to 8bit?
PS is unable to save PNG as 32bit per channel as PNG format itself does not support that. So currently you should check bits per channel yourself and adjust document accordingly. But it could be a good idea if PS would throw an error when it cannot save document according to the used options.