Page MenuHomePhabricator

Get rid of "throwResult()" for control flow in MFA factors
ClosedPublic

Authored by epriestley on Fri, Jan 25, 6:07 PM.

Details

Summary

Depends on D20034. Ref T13222. This is just cleanup -- I thought we'd have like two of these, but we ended up having a whole lot in Duo and a decent number in SMS. Just let factors return a result explicitly if they can make a decision early. I think using instanceof for control flow is a lesser evil than using catch, on the balance.

Test Plan

grep, went through enroll/gate flows on SMS and Duo.

Diff Detail

Repository
rP Phabricator
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

epriestley created this revision.Fri, Jan 25, 6:07 PM
epriestley requested review of this revision.Fri, Jan 25, 6:08 PM
amckinley accepted this revision.Sat, Jan 26, 7:18 PM
This revision is now accepted and ready to land.Sat, Jan 26, 7:18 PM
This revision was automatically updated to reflect the committed changes.