I'm confused, there was a sale on canned veggies. I'm guessing you ordered on line and got peas instead of green beans.
I'm thinking you didn't notice you got peas and put them in the pantry and just discovered they are peas. If they are expired you should toss them, if they are still good I suggest donating them to the local food pantry.