Is it possible for you to decide which you have?
Broad Bean Rust starts with yellow marks on the upper sides of the foliage and the brownish marks appear later - usually surrounded with yellowish discolouration. Chocolate Spot starts with brown marks. Both are fungus diseases and there is no available treatment.
Rust can, but does not always, attack stems and pods as well as leaves, but as long as the weather remains dry the spots do not enlarge very quickly, and the attack can sometimes be slowed down by removing affected leaves immediately.
Chocolate spot is much more aggressive. It almost always spreads to attack the flowers and young pods (which it ruins) and can penetrate the older pods and discolour the beans. There is nothing you can do to slow it down.
If you can decide which you have, you will at least know what to expect. In either case don`t give up on them yet, but wait and see how they go on. Pick any pods as soon as they are worth picking - if it is Rust you may well get quite a few and even with Chocolate Spot you have the chance of a few.
When the crop is finished take care to remove and destroy every scrap of of plant growth either by burning or by composting.
Although both diseases are fungal, the two conditions most likely to encourage their onset are close conditions (overcrowding or inadequate airflow) and an excess of nitrogen. Don`t sow in heavily manured ground and don`t use compound fertilizers containing nitrogen, but simply feed with potassium and phosphorous fertilizers.