There are many different contributing factors that play a role in disease outbreaks and responsiveness within the generalized population. Now just solely looking at the two factors your inquiring about, failure to vaccinate vs vaccine failure, both have a contributing factor with the latter having a "secondary" non-primary attribution. In recent months, vaccination amongst the pediatric population has declined due to parents declining routine vaccinations based on the sole aspects that vaccination is dangerous and can lead to drastic side effects like autism (not the subject of this answer and will only be mentioned here once).
The primary reason vaccination is important, besides promoting health and protection, but allows for herd immunity to remain stable and functional to prevent spreading of deadly diseases to those part of the population, young or old, that can not obtain a vaccination due to many health factors such as chemotherapy or compromised immune systems to name a few. Now since a decline has been seen in vaccination rates, preventable diseases have been spreading with a vergence such as measles because herd immunity is not longer being stable and is decreasing or "weakening" due to the lack of individuals being vaccinated. Now vaccine failure does indeed happen, but usually happens rarely or is uncommon and i usually due to an underlying contributing factor such as allergies, or immune system complex dysfunction. Due to vaccine failure there is usually (not all the time depending on the pathogen) a secondary vaccine that can be given to these individuals to provide protection an example of this is the different flu vaccines such as the intramuscular vaccine and FluMist vaccine.