Most people slip and have a cigarette before actually stopping smoking but this should not be used as an excuse. One of the biggest mistakes a person can do is get discouraged and start smoking all over again.
Slipping and having a cigarette may be a setback but that doesn’t make you a smoker again (maybe smoking the whole pack does but not one). Many ex-smokers tried stopping many times before they finally succeeded. You are not a failure and you can stop smoking.
Try to figure out why you slipped and put a plan in place for the next time you are in the same situation. Learn from your experience and stay motivated to quit.