How do you control Response body output in INavigable with when response code is not a 200

If there is an error (e.g. 401, 500) in the implementation of an INavigable request handler, how do you return a non-200 response code without the platform formatting a canned response as HTML?

This is what I'm doing now:

But, it's returning a 500 error rather than a 401, and it's also returning a block of HTML.  I'd prefer an empty body, or one that I can control based on the expected content type.

Thanks!

Parents Reply Children