Page MenuHomePhabricator

Throw when callers pass an invalid constraint to a "*.search" method

Authored by epriestley on Sep 7 2016, 2:25 PM.
Referenced Files
Unknown Object (File)
Sun, Jan 29, 3:44 PM
Unknown Object (File)
Mon, Jan 9, 10:25 PM
Unknown Object (File)
Sun, Jan 8, 12:45 AM
Unknown Object (File)
Sun, Jan 8, 12:44 AM
Unknown Object (File)
Dec 22 2022, 10:10 AM
Unknown Object (File)
Dec 13 2022, 5:47 AM
Unknown Object (File)
Dec 8 2022, 7:44 AM
Unknown Object (File)
Nov 22 2022, 8:26 PM



Ref T11593. When you call a *.search method like, we don't currently validate that all the constraints you pass are recognized.

I think there were two very weak arguments for not doing this:

  • It makes compatibility in arc across versions slightly easier: if we add a new constraint, we could add it to arc but also do client-side filtering for a while.
  • Conduit parameter types could, in theory, accept multiple inputs or optional/alias inputs.

These reasons are pretty fluff and T11593 is a concrete issue caused by not validating. Just validate instead.

Test Plan
  • Made a call with a bogus constraint, got an explicit error about the bad constraint.
  • Made a call with a valid constraint ("ids").

Diff Detail

rP Phabricator
Lint Not Applicable
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Throw when callers pass an invalid constraint to a "*.search" method.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
chad edited edge metadata.
This revision is now accepted and ready to land.Sep 7 2016, 3:51 PM
This revision was automatically updated to reflect the committed changes.