The HTTP code is what really denotes an error (a 4xx or 5xx status code, see API error handling; returning a 200 for an error isn't correct). The contents give details on what the error is.
The short answer here is if you want to return something with a 2xx (or 3xx) code, you're not returning a response that represents an error, so you wouldn't return an error response from your controller. You can return any response code you want if you return an API result, for example.