__Scenario__:
User has a Katana based selfhosted application and is making a request to a non-existing controller
__Issue__:
Response body does not have the detailed error message that Web API usually gives for these kind of scenarios.
__Reason__:
We introduced something called "Soft" 404 to handle scenarios where Web API shouldn't respond directly to the client, but instead invoke any middleware registered 'after' Web API.
In the logic that we currently have, we are eagerly discarding the response body(which would have had the error message that i am expecting) if its a "Soft" 404 and then checking for presence of any registered middleware and invoking it. But if there was no middleware registered, then we should ideally be returing back the correct response, which is including the response body.
__Expected__: {"Message":"No HTTP resource was found that matches the request URI 'http://localhost:14459/api/doesnotexist'.","MessageDetail":"No type was found that matches the controller named 'doesnotexist'."}
__Actual__: No body
__Attached__ a katana selfhost repro.
User has a Katana based selfhosted application and is making a request to a non-existing controller
__Issue__:
Response body does not have the detailed error message that Web API usually gives for these kind of scenarios.
__Reason__:
We introduced something called "Soft" 404 to handle scenarios where Web API shouldn't respond directly to the client, but instead invoke any middleware registered 'after' Web API.
In the logic that we currently have, we are eagerly discarding the response body(which would have had the error message that i am expecting) if its a "Soft" 404 and then checking for presence of any registered middleware and invoking it. But if there was no middleware registered, then we should ideally be returing back the correct response, which is including the response body.
__Expected__: {"Message":"No HTTP resource was found that matches the request URI 'http://localhost:14459/api/doesnotexist'.","MessageDetail":"No type was found that matches the controller named 'doesnotexist'."}
__Actual__: No body
__Attached__ a katana selfhost repro.