move errorToException 'appendTop' javascript into 'js' hook

since this also fixes not having had this in backend_header before.