title: How to return information when returning a 500 Response
body: <p>I want to return a 500 Exception with information from my backend to my frontend, but everytime I choose to do a <code>Response.StatusCode = 500</code> the code seems to return the 500 Standard Return page. Is there anyway to return my own data after I choose to tell the system it was a 500-error?</p>
  
  <pre><code>[HttpPost]
  public async Task&lt;ActionResult&gt; AccountInformation(OrganizationAccountInformationVM vm)
  {
      var response = await _adminFacade.UpdateOrganizationAsync(organization);
  
      if (response.HasErrors)
      {
          Response.StatusCode = (int)HttpStatusCode.InternalServerError;
          return Json(new {Code = "500", Header = "Error", Message = "Wrong"});
      }
      Response.StatusCode = (int)HttpStatusCode.OK;
      return Json(new {Code = "400", Header = "Success", Message= "UpdatedSuccessful"}); 
  }
  </code></pre>
  
  <p>This code will return "good" data if it has no errors, and "bad" data (a whole html-page) if the resposne HasErrors. Do you know what I'm doing wrong?</p>