The U.S. Securities and Exchange Commission called for Tesla Inc.'s chief executive officer, Elon Musk, to be held in contempt of court Monday, over tweets Musk posted one day before the company's general counsel, Dane Butswinkas, announced his departure.

Butswinkas served as Tesla's general counsel for just two months. He did not immediately respond to request for comment on the reason for his departure.

For GCs, an impending legal crisis can be a career-turning point—stay or go?

When it comes to that decision, David Taylor, the founder of crisis management firm Taylor Strategic and former GC and CEO of Theranos Inc., said there “isn't any one size fits all” solution. The GC's priorities should be what's best for the company and its shareholders, he said.

“In my own case, those really were the keys. I felt like I was there in order to help. I felt I still could help, and I felt like others thought I was helping. So given all those factors, it really answered the question,” Taylor said. “I can see in different cases, where it might not feel that way … if a general counsel felt he or she couldn't help, or others in the room didn't think he or she was helping, that would affect the decision.”

If a general counsel feels they're being helpful—communicating effectively, professionally and respectfully—they should consider staying on, Taylor said. In-house leaders should also consider who would replace them and whether their successor is equipped to handle the situation. If the GC's advice is consistently ignored, Taylor said it might be time to move on.

Steve John, founder of legal recruiting firm Steven John & Associates, said that may be the case with Tesla's GC change. Musk, a tech founder with somewhat of a cult following, has gotten into trouble with the SEC over tweets in the past. He's also preferred to pick lawyers close to him as Tesla's GC.

Butswinkas' predecessor Todd Maron served as Musk's divorce attorney before landing the in-house role. New GC Jonathan Chang has been with the company for eight years. But Butswinkas joined as an outsider from Williams & Connolly in Washington, D.C.

“At some point, as an attorney, you have to make a judgement call on how much you're willing to put yourself in, when there are real professional consequences for lawyers who get swept up in crises,” John said. “You can lose your license. You can lose credibility among your peers. And when you return to a more rational place, you return with some damage if you didn't get out soon enough.”

Jack Tanner, a director at Fairfield and Woods who focuses on in-house ethics, said that in most U.S. states, GCs advising a client to break the law or assisting a client in breaking the law is an ethics violation. But most state's ethics rules don't require GCs to resign from a company engaging in unlawful action. It's a “business, personal decision for the in-house lawyer” to stay or go, and less a question of ethics, he said, so long as they're offering sound legal advice.

Many in-house leaders do choose to stay on. In November, Facebook general counsel Colin Stretch announced he'd stay on despite earlier promises to leave by 2019, following a year of legal and reputation troubles. Uber's former chief legal officer Salle Yoo stuck with the company through a series of lawsuits and negative press.

John said GCs who manage a crisis well can turn a challenge into a chance to grow their skills as a lawyer and business partner.

“These are golden opportunities, golden experiences, that really form general counsel and make them better, stronger, in their roles and in their future work,” John said.

Read More: