docs: update error codes in api document
Merge pull request #1163 from jonboulle/1163_doc

Messages in documentation need updating