Allow returning of error code in fail message.
Support passing error object to response.
Merge pull request #14 from lugovsky/master

Allow returning of error code in fail message.