utils.js: error doesn't need to be a seperate argument