Certified GKH Gardening Expert
This happens in beans and peas, both, for the same reasons. With beans, it can be due to the particular cultivar. With Peas, this is less likely. With both specimens, improper watering will be to blame. Letting them get too dry, then watering too much will be the primary cause.
However, disease and pests can cause this, as well. Unfortunately, your images did not come through, so I am unable to diagnose the issue further.
Unfortunately, our only article on the subject refers to beans, but since this happens to beans and peas the article will still apply to you. This will help: