Missing return statement in error callback