NodeAPI: add validation tool to handle errors