$success can be undefined in case the if above evaluates to false. Can it ever evaluate to false?