The default risk does not mean that whole investment would be lost. The investor would still be able to recover a part of the investment. The “RECOVERY RATE” is that percentage which the investor would be able to recover in case of a default.
The probability of the issuers of bonds to default is called “DEFAULT RATE”.
With these recovery and default rate, the estimated expected loss in case of default can be computed.