(#509) add pouch error code back in
Merge pull request #582 from daleharvey/509-error-method

(#509) add pouch error code back in