cherry-pick @mdmower patch fix to legacy props setup
this mainly adds proper error checking
formatting fixes
really hammer lazy devs
6.23.7