Everyone makes mistakes. Some companies, however, made bigger mistakes than others in 2017.

For all the entrepreneurial success stories this year, it's equally important to focus on the cautionary tales--the companies that messed up in ways that should have been easily avoidable.

Here are the top five startup cautionary tales of 2017--and the lessons you should learn from them:

1. MyPillow gets caught with fraudulent advertising.

The Minnesota-based maker of bedding products started off the year with a bang. Just three days into January, MyPillow was downgraded by the Better Business Bureau from an A+ to an F, seemingly as quickly as a snap of the fingers.

It turns out, MyPillow had started running a "buy one, get one free" promotion in 2015--and never stopped. The "sale" price essentially became the normal price (an advertising no-no). Even with multiple warnings from the bureau, MyPillow founder and CEO Mike Lindell refused to alter the ads until after the holiday season.

Later in January, MyPillow removed the ads, according to a MyPillow spokesperson, which likely saved the company from a run-in with the Federal Trade Commission. Its F rating on the bureau's website, however, still remains. The company was forced to lay off 140 employees in April due to "a delay in new commercials and slower sales," according to the Star Tribune.

The lesson: The FTC prosecutes companies for false advertising, and the bureau often refers cases directly to them. Stay honest and you'll avoid  cease and desist orders, large fines, civil penalties, corrective ads, and other court orders.

2. Uber suffers too many scandals to count (though you can try).

Where to start? In February, engineer Susan Fowler published her essay on sexual harassment and sexism in the Uber workplace, kick-starting public outcry, cover-ups, resignations, and investigations. Later that same month, video surfaced of founder and then-CEO Travis Kalanick berating his Uber driver.

In June, board member David Bonderman made a sexist joke at a meeting about Uber's sexism problem and promptly resigned. Kalanick also resigned in June, promising to step away--yet he's still at the center of boardroom power struggles.

There have been lawsuits, regulatory fights, shady attempts to undermine competitors, and diversity issues aplenty. And while new CEO Dara Khosrowshahi seems to have a steadier hand than Kalanick, the year's not over yet.

The lesson: Stamp out sexual harassment and sexism in the office. Treat your employees well. Don't flaunt the law. Basically, if Uber did it in 2017, you probably shouldn't.

3. Wag sends its own customer a cease and desist letter.

Kalanick berated one of his drivers. Wag, a San Francisco-based dog-walking and dog-sitting startup, took it a step further.

Long Island resident MaryEllen Humphrey used Wag to find dog-sitting during a family vacation to Disney World in September. While she was gone, her Beagle-Labrador mix Buddy went missing.

Humphrey publicly accused Wag of misrepresenting its rescue efforts and offering her $2,500 to stay quiet to the press. Wag sent Humphrey--a paying customer--a cease and desist letter in response.

Let that sink in a moment.

The lesson: Don't send your customers cease-and-desist letters. That seems obvious. But if you need a monetary incentive--and you really shouldn't--a Bloomberg report says the incident scared away potential Wag investors. Think before you threaten legal action.

Buddy was eventually found, thanks to Humphrey's social-media efforts, and reunited with his owners. A happy ending to his tale.

4. United Airlines displays astonishingly awful customer service.

It started in March when two girls were banned from a United Airlines flight for wearing leggings as pants. It got worse in April, when security officers bloodied Dr. David Dao and dragged him off an overbooked United flight.

In July, a United flight attendant wouldn't let a 7-year-old sleep on a couple empty seats because they "cost people good money." Most recently, in November, United was sued by another flight attendant for not letting her wear clogs in airports.

The lesson: Treat your customers like family. You hate your family? Fine, treat your customers like family you actually like. And whatever you do, don't physically abuse them. (Again, that seems obvious.)

5. Dave's Soda and Pet City gets boycotted after a Trump photo-op.

Poor Dave Ratner. The owner of Dave's Soda and Pet City, a chain with seven locations throughout Massachusetts and Connecticut, didn't expect a group photo-op with President Trump to cause New Englanders to boycott his stores.

The group of business owners was celebrating an executive order that would make it easier for small businesses to purchase health care for employees. They reportedly didn't know the order would also attempt to dismantle large portions of the Affordable Care Act.

Ratner's predominantly liberal customer base didn't take kindly to photos and videos of Ratner at Trump's executive order signing. He's suffered boycotts, savage Yelp reviews, angry Facebook comments, and more--despite his best attempts at public apologies and reconciliations.

The lesson: Ratner hardly had a chance to explain himself before he was judged. That's the way things work in today's social-media world, so carefully weigh your actions--and how they could be interpreted by your target audience--before you make them.

EXPLORE MORE Best in Business COMPANIESRectangle