Moved errorHandler to utils.