The shell doesn't re-evaluate your no_error variable when you use it like that. It just gets passed to ./some_command as a command-line argument. You can get the behaviour you want by using eval. From the bash manual:
eval [arguments]
The arguments are concatenated together into a single command, which is then read and executed, and its exit status returned as the exit status of eval. If there are no arguments or only empty arguments, the return status is zero.
Here's an example for your case:
export no_error="2>/dev/null"
eval ./some_command $no_error
Note that you can't have a space between the 2 and the >. I'm guessing that's just a typo in your question, though.