The sample HttpResponseException on this page is mutable. This is not a good programming practice, and we don't want customers to copy&paste antipatterns into their code:
public class HttpResponseException : Exception
{
public int Status { get; set; } = 500;
public object Value { get; set; }
}
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
@pranavkm please suggest how to fix this. See Use exceptions to modify the response
Lots of result types in MVC are mutable. Why is it considered a bad programming practice?
Most helpful comment
Lots of result types in MVC are mutable. Why is it considered a bad programming practice?