[api] [minor] Set 500 status code on error message   * Better API semantic for users   * Adds better code comments
[api] [minor] Set 500 status code on error message
  * Better API semantic for users
  * Adds better code comments

Stackvana/stack,Stackvana/stack,Stackvana/stack,Stackvana/stack,Stackvana/stack,Stackvana/stack