Added server response code 500 incase of exception