title: How to stop asp.net mvc from redirecting to an error controller when an exception occurs during a json post
body: <p>How do you stop asp.net mvc from redirecting to an error page when it was a json post?  It keeps trying to redirect to the error path in my config file when an exception occurs and I need it to return the exception...also it doesn't even try and direct them to the correct path - it keeps looking for an Error.cshtml view under Home (the Home folder for views, as if it is trying to use my home controleler), when they are all under an Error folder/controller set up, which is clearly outlined in my config file:</p>
  
  <pre><code>&lt;customErrors mode="On" defaultRedirect="~/Error/Error"&gt;
    &lt;error statusCode="404" redirect="~/Error/NotFound" /&gt;
    &lt;error statusCode="403" redirect="~/Error/Forbidden" /&gt;
  &lt;/customErrors&gt;
  </code></pre>
  
  <p>Thanks!</p>