credit risk of an option

I’m confused about this. I understand that the long has the credit risk but when they tell you to calculate the credit risk of an option, how do you do it?

It’s simply the current market value of the option contract less your premium which is what would be owed to you should you decide to exercise the contract prior to expiration (American).

Why would you subtract the premium? That’s a sunk cost.

Here’s an example…

You open your trading account and you buy an option. An hour later, your broker goes bankrupt and you lose every penny you had with them. How much do you think you had at risk right before the announcement? Answer: the value of the option at that time. There’s nothing to add or subtract.