Many of us see our coworkers more often than we do our significant others, and when you spend that much time with anyone, the occasional uncomfortable scenario is inevitable. “It's common for tricky situations to emerge in the workplace,” says Lori Scherwin, founder of career firm Strategize That. “In all situations, you have the ability to choose how you interpret it."

"Attitude matters, so keep a positive one,” Scherwin says. And take a moment to get your feelings in check before responding—you'll want to make sure you respond to the situation objectively and not emotionally. Then, follow this expert advice to handle the unpleasantness gracefully.

1. YOU GET THROWN UNDER THE BUS

Let’s say you’re working on a project and your teammate drops the ball on a specific task. Your boss asks what happened and—perhaps out of panic—your colleague points to you.

It’s tempting to take the confrontational or defensive route and snap back at your coworker, but that can backfire. In this scenario you want to accomplish two things: Let your boss know you’re not to blame and let your coworker know he or she can’t get away with that manipulative behavior. “Most bosses are not stupid. For the most part, they know who is the one performing and who is the one taking the easy route,” says Branigan Robertson, an employee rights attorney.

Still, you may want to clear the air and it’s probably best to simply be direct. Robertson suggests approaching your coworker with a calm but authoritative suggestion. He suggests saying something along the lines of, “Hey, I’m not sure what’s going on but the boss is blaming me for this. This was your job. Let’s go to his office and clear this up so he knows we’re working [to correct things] as soon as possible."

By making it known that you're hip to your coworker's finger-pointing, he or she will be less likely to pass the blame in the future. If it does happen again, though, it might be time for a conversation with your boss. Just make sure you keep the meeting quick, professional, and blameless. Make it about a misunderstanding rather than an issue with your colleague, Robertson says.

Of course, there’s throwing you under the bus and then there’s bullying. If the situation is more severe, you may have to take further action. “If it becomes overly toxic or inappropriate, keep a paper trail and raise the issue immediately,” Scherwin says. “Everyone deserves to be treated with respect—so advocate for yourself.”

2. SOMEONE KEEPS STEALING YOUR LUNCH

Hopefully you're not losing any sleep over lunch theft, but it can be frustrating if your food mysteriously disappears from the office kitchen. Robertson suggests leaving a public note or sending an email blast out to the entire department. He recommends keeping things light to begin with:

Dear Whoever Stole My Lunch,

I hope you really enjoyed my sandwich. Next time you are hungry, please let me know who you are so I can bring in a second sandwich and share it with you. I don’t like hungry coworkers.

If the scenario is truly egregious (it's happening every day, or you have specific dietary requirements), Robertson says you should skip the note and take it up with a manager or someone in HR. “If anyone is acting unethically— in any situation, whether in job tasks or stealing food—raise it with someone who can get it taken care of. Bad behavior should never be tolerated, regardless of how major or not it seems.”

This is about more than just a missing yogurt, Robertson says, it's about office culture. “It is critically important to work in an environment where people trust one another. It's all about character—so if you see someone acting out of line consistently, raise the issue.”

3. YOUR BOSS WON’T STOP GOSSIPING

Workplace gossip is especially awkward when it comes from your boss. Not in the least because it may cause you to wonder what is said about you behind your back—and how that might affect your future with the company. Whatever the reason for the discomfort, you want to stop gossip and complaining in its tracks, even when it comes from the top.

You can approach the situation with either of two methods: zero affirmation or redirection. With zero affirmation, you resist responding to the gossiper's bait. “Never agree with them,” Scherwin suggests. “Keep a neutral footing. Complaining is contagious—do your part in stopping it in its course.”

If they don’t take the hint, politely try to redirect the conversation, Robertson suggests. “If your boss comes into your office and starts gossiping about one of your coworkers, quickly interrupt him or her and say, ‘Oh c’mon boss, you’re not paying me to chit chat about Paula’s love life, can we talk about tomorrow's meeting? I need your direction on how to present the numbers.”

It’s important to end the conversation as soon as you can. The longer your boss continues to gossip, the harder it is to nip it in the bud. And when you ask about a task, you shift the conversation’s direction back to work.

4. A COWORKER ASKS HOW MUCH YOU MAKE

Some companies are completely transparent about salary and benefit information, but many aren’t. So a question about your pay may put you in an awkward position. While sharing this information is legal in most cases, Scherwin suggests first considering what could be lost or gained by doing so. “Personal and sensitive information can get misconstrued if shared and can unnecessarily create hostility,” she says. “On the flip side, it can give you ammo to negotiate for more.”

Only share when there’s trust, confidentiality, and you’re comfortable with how the information will be used, Scherwin says.

5. A COLLEAGUE TOOK CREDIT FOR YOUR WORK

It’s frustrating when a colleague piggybacks on all your hard work. You may feel petty for wanting the credit, but it's reasonable to seek recognition when you've put time and effort into a project. The best way to keep this behavior at bay is to keep a record of your tasks.

“Keep an e-mail record and be on guard with this coworker,” Scherwin says. “Take responsibility for sending the final product to the boss. Make sure you are actively discussing your ideas and progress across your organization so your role is clear before it's too late.”

As with trying to pass the buck, most bosses know what’s going on and may be more aware of the situation than you realize. Still, it can help to keep them updated on your progress. “Stay in communication with the person you want credit from [while you work]," Robertson says. "Tell them about what you are doing while you do it.”

This way, not only will your boss know the truth if a coworker tries to take credit for your work down the road, but if your coworker does take credit, your boss will see right through it and the situation will take care of itself.

Stickier, though, is your boss taking credit for your work. This may be a sign that your boss feels threatened by you; a confident manager typically has no problem supporting their team. “They may only be looking out for themselves and not be giving you as much ‘air time’ with senior management which would help you get future promotions,” Scherwin says. “Alternatively, they may also not even realize that this is impacting you. Always handle tricky boss conversations maturely. Take the emotion out of it. Rather than getting upset and demanding more credit, simply tell them you enjoy what you are doing and want more visibility, and ask them to work with you to make that happen.”

In other words, you want to make your manager part of the solution, she adds, rather than make it seem like they’re a problem. Workplace scenarios can be tricky to navigate and that seems to be the answer for most of these: Focus less on the problem and more on the solution and you’ll be on your way to a congenial workplace.