301 and 302 are not interchangeable
A 301 says this has moved permanently: replace the old URL with the new one in the index. A 302 says the move is temporary: keep the old URL indexed. Google has said all 30x redirects pass PageRank, so the difference is which URL is indexed rather than whether value carries across.
Choosing wrong is invisible. A migration done entirely with 302s looks perfect in a browser — every link goes to the right place — while Google may keep the old URLs in its index rather than swapping them for the new ones, so the pages you want ranked are not the ones listed.
This is one of the most common causes of a redesign losing traffic, and it survives because both codes work identically for a human visitor. Nothing except a checker will tell you.