Correct utils.error and the way the promise catch and throw the error