NASA is currently planning to launch Artemis 1 despite a temperature sensor on engine #3 giving an out-of-spec reading on the assumption that the sensor is faulty. If the sensor isn't faulty, what would happen if the engine starts but fails to keep running?
The mission wouldn't exactly fail, provided that the engine doesn't shutdown in the first few seconds of flight, but contingencies would have to be made.
This NASA report regarding Exploration Flight Test 1, which initially was planned to launch on SLS, states that
The SLS Launch vehicle has four RS-25’s on the Core and analysis has shown that the Block 1 configuration can recover from an unplanned engine shutdown in almost all phases of flight. Late in flight, SLS would press to Main Engine CutOff (MECO) and continue on its nominal mission profile. Two other targets, an Alternate MECO Target (AMT) High for engine failures in the middle portion of flight, and an AMT Low target for failures very early in flight rounds out the engine out capability of SLS. For Artemis I, the AMT High target was derived to ensure Orion could meet its high-speed reentry test objective for its heat shield by inserting the Interim Cryogenic Propulsion Stage (ICPS) and Orion stack into an orbit where the ICPS could insert Orion into a highly elliptical Earth orbit. The Artemis I AMT Low target was derived to help Orion achieve all its other flight test objectives in Low Earth Orbit. The switching between targets is handled either through flight software or by Mission Control. Both the vehicle and Mission Control will monitor SLS’s velocity on ascent to make the determination as to which AMT the vehicle is capable of achieving. The AMT’s are also derived so that the Core reentry, even in the event of an engine failure, has a high probability of impacting water instead of land.
This implies that for a 3600 km apogee, SLS would be capable of pushing to the target orbit even with an engine failure after 198 seconds. However, for the current Artemis 1 mission, I would estimate that a press to MECO would only be possible after at least 230 seconds of nominal flight due to the higher-energy injection.
As the graph shows, an near-immediate engine failure would cause the mission to reach only LEO, but as this was for EFT-1, the current Artemis 1 cannot afford to lose an engine almost immediately after launch as that would cause imminent mission failure.
This might be a little incomplete/inconclusive, so please feel free to edit to add extra details that I may have missed.