change error function signature