301 and 302 are not interchangeable
A 301 says this has moved permanently: index the new URL, and pass the old page's accumulated ranking value to it. A 302 says this is temporary: keep the old URL indexed, and do not pass anything on.
Choosing wrong is expensive and invisible. A site migration done entirely with 302s looks perfect in a browser — every link goes to the right place — while Google keeps the old URLs in its index and passes nothing to the new ones. Traffic drops and nothing on the site appears broken.
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.