working on error propagation to js