title: How to debug (500) Internal Server Error on Python Waitress server?
body: <p>I'm using Python and Flask, served by Waitress, to host a <code>POST</code> API. I'm calling the API from a C# program that posts data and gets a string response. At least 95% of the time, it works fine, but sometimes the C# program reports an error: 
  <strong><code>(500) Internal Server Error</code></strong>.</p>
  
  <p>There is no further description of the error or why it occurs. The only clue is that it usually happens in clusters -- when the error occurs once, it likely occurs several times in a row. Without any intervention, it then goes back to running normally.</p>
  
  <p>Since the error is so rare, it is hard to troubleshoot. Any ideas as to how to debug or get more information? Is there error handling I can do from either the C# side or the Flask/Waitress side?</p>