You bought the car with a 6 month warranty. Let the dealer try to fix it first under warranty before getting nrnd out of shape. It is not unusual for some shops to schedule repairs for later. If they are busy with other cars in front of yours. Make sure you have an appointment with the service dept for Friday so your not wasting your time.
But, if it is an Evap code, most likely P0420, then don’t be afraid to drive it until it can be seen by the shop. This code is not dangerous to the engine, and should only affect the emissions of the car, and not even the exhaust emissions. It just means some fuel vapor may be escaping to the atmosphere. Make sure the fuel cap is on tight is all you can do until a mechanic can see it.
does dealer have vin database info on prior warranty work for this car? its new. there should be records of all warranty work in system. maybe this is first problem on car. maybe not
Did you happen to fill up the gas tank and keep adding gas after the handle first clicked off, i.e. top off? That will throw a code on some cars if someone (previous owner) makes a habit of doing this. If so, stop overfilling, the code will clear itself eventually as the canister dries out.
A missing gas cap will throw an EVAP system code. Did replacement of the cap fix the problem?
Filling up with the cap off will also throw a code, as Barkydog said.
This is not a case of fraud if replacing the cap fixed the problem.
If it did not, and the dealer put an inspection sticker on it (it that’s relevant to your state), then you could conceivably threaten to complain to the state, or if he otherwise misled you, you might have a case, but from what’s contained in the post you don’t.
Just not tightening the gas cap enough will set off an evaporative emissions code. Tighten it enough to click a few times. Don’t panic, it sounds like you have a severe case of buyers remorse. This isn’t fatal and no, the dealer won’t give you your money back.