compiler: js: stab at reinstating success and error callbacks