error is undefined. Change to err to match the other examples