Forum Discussion

sazandora's avatar
sazandora
Occasional Visitor
4 years ago

.net core controller - Error: No Reason Phrase

I have a .net core controller that returns a number of application defined status codes(i.e. non HTTP codes).

When I execute a request, the server response has the Code of one of my custom codes but has 'Error: No Reason Phrase' listed under details.

I tried under setting the controller attributes thusly:

[ProducesResponseType( typeof( int ), MY_CUSTOM_CODE )]

[SwaggerResponse( MY_CUSTOM_CODE, typeof(int), Description = "My custom message" )]

 

Any help would be greatly appreciated.

 

 

No RepliesBe the first to reply