Detect printer errors like "Unable to Connect"

I just encountered a case where my app could not print on customer’s Windows 10 computer. After doing a lot of testing on their computer, we discovered that their default printer showed an “Unable to Connect” error inside control panel.

So I think my app went to get the default printer settings and then it never returned or perhaps threw an error.

Nothing popped up. App didn’t crash. Just nothing would show in print or print preview but a gray screen where the pages should have appeared.

I searched the forums but did not find any posts on how to detect this type of printer error to show a graceful message to the user to select a different printer or something.