Eden's town supervisor said someone threw a "partial pipe bomb" into her home.
Supervisor Melissa Hartman said it was an apparent effort to persuade her to drop her bid for Erie County Clerk.
Hartman told reporters Friday that the device was thrown into her home early Monday while her family slept. It did not explode.
She said one of several threats written on the device said that if she doesn't drop out of the race, the next bomb will be live.
Hartman is the Democratic party's endorsed candidate for the county-wide office.