There are (at least) two different ways in which one can be a good friend. Unfortunately, they’re pretty much opposites. It’s a problem to pick the wrong way, and the cues are not necessarily clear.
The first way to be a good friend is to be a consistent supporter. That means whatever your friend does, no matter how foolish, you are a cheerleader and a willing ear. Their enemies are villains. Their goals are worthy. Their allies are heroes.
An entirely different way to be a good friend is to be a truth teller. Sometimes it takes a special kind of friend to tell someone that they're not in a good place. It might be an issue of grooming, it might be an issue of their work choices, it might be an issue of their relationship choices. Their enemies might not be as bad as they think; their goals might have some issues they don’t see; their allies might not be as trustworthy as they think.
It's sometimes hard to figure out which is appropriate for a given situation. An easy (but sometimes incorrect) default is to do whatever is your habitual approach: most people prefer one style or the other. It’s reasonable to think that your friend is coming to you with some awareness of what you usually do.
However, that’s not guaranteed. There might be some other reason that they are talking with you. For example, you might be the most readily available person. They might also have some more complex, possibly even confused reason for talking with you.
Some people may not recognize that there are two (or more?) different ways of being a good friend, and they may experience the “wrong” style as totally unfriendly. After all, if I want to be reassured, it can only seem unpleasant to have a supposedly good friend start telling me difficult truths about myself. Likewise, if I want to understand and improve in a situation that I already understand to be problematic, it can seem at least unhelpful and possibly annoying to have a supposedly good friend reply with nothing but positivity.
Some people may not even be aware of the difference. For them, whatever they need at a particular point in time may constitute “being a good friend,” even if at one point that’s unquestioned support and at another time it’s truth-telling. One concrete example that I know is a friend who expresses the firm opinion that being a good friend requires unquestioned support. That sounds like a simple enough view of the world. But I have noticed that, from time to time, this same friend tells me a story about interactions with other people that emphasizes either praise for someone else’s truth-telling, or criticism for someone else’s unquestioned support. Their actual behavior in this dimension doesn’t seem to align with their stated simple view.
My tentative conclusion is that this friend operates with roughly the same understanding that I do, but perhaps at an unconscious or non-verbal level. Or perhaps they have a more nuanced view of the world, and only articulate the simpler version to me. It’s hard to be sure.
Is there a reliable solution for choosing the right mode? Unfortunately, I don't think so. The obvious potential solution is simply to ask. One formula asks, “do you want to be heard, helped, or hugged?” Asking that question can give you a sense of what kind of feedback would be most palatable, but doesn’t necessarily answer the question of what would be most valuable. For example, if a friend is in a bad situation, seemingly in denial of that bad situation, and repeatedly seeks reassurance that it’s all fine, simply asking what they want won’t necessarily yield the right action. However, it will have the virtue of respecting their autonomy and leaving them to solve their own problems.
If we want a reliable solution, we encounter two unfixable obstacles: one is that we can’t read minds, and the other is that we can’t predict the future. Since we can’t realistically expect to solve either of these problems, we must anticipate that there will be some fraction of the time that we will choose incorrectly. How should we bias our likely errors?
If I am supportive when I shouldn’t be, my friend may be in a bad situation that I could have helped them escape. In contrast, if I am truthful when I shouldn’t be, my friend may be hurt and/or feel that I am a meddler. Further complicating the choice is that even for the closest friends, I rarely have all the information that they have about their situation. Unless they have explicitly shared everything they think is significant, it’s very likely that I am unaware of something crucial.
Accordingly, in terms of risk vs. reward, it seems a better choice to default to a “supportive” strategy for all but the most serious kinds of bad situations: perhaps those involving the potential of serious physical harm or breaking the law. In this framing, truth telling is an important part of being a good friend – but only if applied sparingly, in the very direst situations, or when explicitly requested.