Invalid parameter values will return an error detailing which parameter is problematic.
Details
The Hypergeometric distribution for \(N\) total items of which
\(m\) are of one type and \(n\) of the other and from which
\(k\) items are picked
has probability mass function :
$$Pr(X = x) = \frac{\left(\frac{m}{k}\right)\left(\frac{n}{k - x}\right)}{\left(\frac{N}{k}\right)}$$
for \(x = 0, 1, \dots, \min(k, m)\).