In the last couple of weeks I noticed a difference in running our REST APIs locally, a Windows 10 machine, and our demonstration server, a Windows Server 2019.

On the server when an error is triggered, 40X or 50X, the response returned wasn't the one we had crafted or generated by Mike Peat's REST framework. It was something like this (note this is the short version):

Code:
<body>
   <divid="header">
     <h1>Server Error</h1>
   </div>
   <divid="content">
     <divclass="content-container">
       <fieldset>
         <h2>401 - Unauthorized: Access is denied due to invalid credentials.</h2>
         <h3>You do not have permission to view this directory or page using the credentials that you supplied.</h3>
        </fieldset>
     </div>
   </div>
</body>
Instead of:

Code:
{
   "Unauthorized": "Session key not known (reload page to recreate session)."
}

I suspect the problem on the server has always been there since my testing is done on the my local machine.

Anyway, should anyone come across a similar issue I was alerted to this post. Configuring the website's existingResponse on the server from Auto to PassThrough resolved the issue.

Click image for larger version. 

Name:	2021-02-18_11-49-47.jpg 
Views:	113 
Size:	86.7 KB 
ID:	14330