DSCEngine.burnDsc don't allow user to decrease it debt when it's under liquidation.
DSCEngine.burnDsc
allows user to repay his debt. He sends stablecoin, which is than burnt and user debt has decreased.
https://github.com/Cyfrin/2023-07-foundry-defi-stablecoin/blob/main/src/DSCEngine.sol#L212-L215
As you can see, after user did that there is health factor check. In case if user was not under liquidation or became such after repay, then tx will proceed. But in case if user still under liquidation(has bad health factor), then tx will revert.
Because of that, user with bad health factor can't repay small amount of debt. This is not ok, because in such way they can decrease amount of their collateral that can will be taken to the liquidator.
User under liquidation can't decrease his debt.
VsCode
I do not see the reason to have health factor check after user repays.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.