Added some exception try/catch because getError is undefined.

_responseCode and _responseMsg change to responseCode and responseMsg (and created in added as private parameters)

Not sure if this is the correct way to make pull request? I have not made so many of them