title: Error handling strategy to be used in production
body: <p>Let's say we have a good but a slightly complex product. The product went wild. Customers are medium and relatively big companies. The level of customers bureaucracy is quite high: </p>
  
  <ul>
  <li>many different roles and responsibilities</li>
  <li>protected environment</li>
  <li>dozens of rules and policies</li>
  <li>highly specialized engineers (DB-guy belongs to one department, tomcat-guy to another, etc)</li>
  </ul>
  
  <p>With such an approach even a trivial operations(restart and app, get logs, etc) may take hours or even days. Access to logs can be limited or totally prohibited. As I said before, the product is complex, so it is likely there will be some issues during the deployment and initial configuration phase. Which means a customer will  require some assistance and help from the support team.</p>
  
  <p><img src="https://i.stack.imgur.com/VmSgc.png" alt="enter image description here"></p>
  
  <p><strong>The problem is end-user usually belongs to a R&amp;D department and does not have access to application, application logs, database, etc. In the other word end-user is not able to provide any valuable information at all. Screenshots are the only available feedback.</strong></p>
  
  <p><strong>Does anybody know any good solution to this problem?</strong></p>
  
  <p>The idea is to make customer happy, offload support team and respond promptly on any request. Please also note there are some rules regarding sensitive information, etc.</p>
  
  <p>I see several possible ways for an application to handle an error:</p>
  
  <ul>
  <li>present high-level problem information with "More details" option, providing sanitized exception or error code</li>
  <li>do the same but also collect some additional information, logs, encrypt it and allow the user to download the file</li>
  <li>provide hidden "service" screen with access to logs and additional system information</li>
  <li>introduce something like a debug mode, to be used on early phases</li>
  <li>finally, permanent access to logs can be requested (personally I think this is unsafe solution). </li>
  </ul>
  
  <p>All these options  are not so good from the usability and security perspectives.</p>
  
  <p>What would you do in such a situation?</p>