title: Are there server side exception that are non-retryable?
body: <p>I am designing a REST API and was looking to HTTP response code 500. It looks like the clients can retry such requests. </p>
  
  <p>So now I am trying to understand if there are server-side error cases that clients should NOT retry. To me, it looks like everything apart from 501 are retryable. Even a coding bug in the server that results in an NPE still is retryable (considering the clients can retry once the bugs are fixed.) </p>
  
  <ol>
  <li>What are the cases where service can throw an error (because of server-side issue) and ask clients not to retry?</li>
  <li>In such cases, what HTTP response code is used in the industry? Should I use HTTP response code 500 and put additional details inside the response body to let clients know that they should not retry.</li>
  </ol>