A Samsung range displaying C-31 sends you to a circuit-board temperature sensor, like C-30. Restart the oven; if the code persists, Samsung's manual says to cut power briefly and reconnect.
What it means
Board sensor check
Samsung gas slide-in range (NSG6**87 user manual), NSG6**87****** Major
Regions: United States
What the manual says
Like its neighbor code, this one points to a temperature sensor on a circuit board. Restart the oven first, then disconnect power to the range for a short time if it remains.