Fallback service returns {}

Hi! I have defined a Fallback route service as reported in the documentation:

   [FallbackRoute("/{Path*}")]
    public class Fallback
    {
        public string Path { get; set; }
    }

    public class FallbackResponse
    {
    }

    public class FallbackServices : Service
    {
        public object Any(Fallback request)
        {
            return new HttpError(HttpStatusCode.NotFound, "Not Found");
        }
    }

Everything works fine but when it get triggered it responses with a “{}”.
Is there a way to get only a 404 status code without any response text?

Thank you

Don’t throw/return a HttpError if you don’t want a error response body.

See the Customize HTTP Response docs for different ways on how to customize the response.

Thank you mythz, I’ll post here my solution for others to come:

    [FallbackRoute("/{Path*}")]
    public class Fallback
    {
        public string Path { get; set; }
    }

    public class FallbackResponse
    {
    }

    public class FallbackServices : Service
    {
        public void Any(Fallback request)
        {
            base.Response.StatusCode = (int)HttpStatusCode.NotFound;
        }
    }

I just set the StatusCode response:

base.Response.StatusCode = (int)HttpStatusCode.NotFound;

It seems to work, I forgot something else?