err conversion in nodejs