(#509) add pouch error code back in