There are two clues in GWX that you might be about to embarrass your employers:
If using 'weapons officer assistance', get him to recommend your chosen target before firing. If he replies 'Cannot recommend target' then something needs to be double-checked.
The other, sure-fire, way to know you have torpedoed something you shouldn't is to listen to the crew's response. If they don't cheer the hit or sinking

, you need to start thinking of excuses to tell Doenitz.
There is a list kindly provided by the developers of GWX giving the start of hostilities for every nation you might encounter at sea during the war. Press F1 while in-mission and have a look.
I recently had a captain dismissed for completing three unsuccessful patrols (one of them pre-war). Got back to port and the sim wouldn't allow him access to the boat or crew management screens. At least you sank something.
KH