You can make the extract optional, and then it will not complain when the result is a 404. Sadly, it will also not complain if the result is a 200 but the result was not found. But then you could use a doIf to inspect that the result is what was inspected, and then error out if it is not.
Alternatively, you can store the status and the full json in a variable, and then do some logic using doif. However, then you would have to use a different method for parsing and extracting the parts you need from the json. I've done it. It's doable. But it will not be done using basic Gatling DSL. You can use Jackson or Boon, but you will have to interface to those libraries yourself. It's not a ton of code, but it is doable.