Zend certified PHP/Magento developer

“The requested qty is not available” not always shown?

Magento 2.4.2

Lets say I have a qty of 1 for product X. Now when I try to put a qty of 10 of product X to the cart, the message “The requested qty is not available” is NOT shown. Nothing is added to the cart.

When I put a qty of 1 to the cart (which works) and afterwards, I try putting 10 or whatever to the cart, the message is shown. In other words, it seems to be displaying the message only if the stock is 0.

The question is, why is it not shown when I tried putting 10 in the first place? Is this a bug or a feature? Maybe some setting?

Thanks!