title: is there any good way to pass error object in rest api
body: <p>i got error object :
  Error: ER_ACCESS_DENIED_ERROR: Access denied for user 'root'@'localhost' (using password: YES)
  type of (err) : Object</p>
  
  <p>now i wanna pass this object to another web service (restapi)</p>
  
  <ol>
  <li>what content type will it need ?</li>
  <li>how to pass whole error object in body of rest api ?</li>
  </ol>