title: Set the HTTP content type response to “application/json” in php
body: <p>I have a question. I have the folowing condition : </p>
  
  <pre><code>You should return an HTTP 500 status code and more details about the error in the message body. Set the HTTP content type response to “application/json”.The error detail must be in JSON format as described below:
  
   {
      "ErrorCode" : 402,
      "ErrorMessage" : "Item"
    }
  </code></pre>
  
  <p>I tried like this : </p>
  
  <pre><code>if(!Gain::verifyIfUserExistByIdm($aOutput['UserId'])){
      header("HTTP/1.0 500 Internal Server Error");
      return json_encode(array('ErrorCode'=&gt;407,'ErrorMessage'=&gt;'Error'));
      die();
  }
  </code></pre>
  
  <p>But not work, can you help me please? Thx in advance</p>