I can only talk about my experience. I've been a dev but mostly done support and implication roles. I'm usually the the guy who uses the n-word with execs: "No".
Execs hate that word. It ruins thier day.
Sales, legal, compliance, product (and HR and finance) all say yes to whatever an exec says. They might think it's a bad idea but they can just do it anyway.
Only tech people will give a hard no and say, up front, that X is not just dumb but not possible.
Sometimes this is worsened as, by concentrating on technical skills, we can lack interpersonal skills. I never start by saying "No". I start by trying to understand if we can achieve the same result another way, or steering the conversation away, or saying I will look into it and never getting back to them. This is much better. But occasionally I get cornered and have to say that word.
I follow it with some carefully dumbed down but still unwelcome explaination. Tech people usually make another mistake here: they think that an explaination is helpful, but it isn't. People want their widget. Explaining why they cannot have it just add insult to injury.
Because if my "nonconfrontational" style, I am much more popular than my (more able, smarter, harder working) tech colleagues. I am seen as more of a team player maddeningly.
This is covered in How to Win Friends and Influence People. No one thanks you for telling them an inconvenient truth. Except in tech where other people actually will thank you for educating them and saving them time. Sadly that does not translate the the real world (including the C-suite).
Disclaimer: you may get lucky and find one or two managers who do appreciate getting a straight answer fast. Value them.
A few examples:
* An exec wanted a VWAP Algo in crypto. He'd sold it to a client who was very impressed we'd managed to make one. But to run a VWAP you need reliable volume profiles and volume profiles on crypto (last I checked) are not at all reliable. I managed to steer the client into accepting a Percentage of Volume Algo. It's not the same bit it's similar.
* A client needed Transaction Cost Analysis which we did not do. I managed to turn that into them specing out TCA for us to build with a 6 month lead time. I was very pleased with that achievement. No one else was happy about that though. Product were pissed because it broke their roadmap (no mercy for them, they said yes when the exec "checked" it was already done). The exec would not understand why we couldn't "just do it". And I became the bad guy.
* I lost the support of the CTO because I came back from a client with 32 smart, sensible, necessary improvements to our algos and he thought it was not my place to bring. I had the client rename and send the same list and it was forwarded company wide as great input and much appreciated and rushed to engineering for immediate execution.
Yes, I am a little bitter sometimes :) but it's better to play the game and win...