(#509) add pouch error code back in

pull for #509, like #581 but without:
![gdi](https://f.cloud.github.com/assets/1128607/291518/dfd75916-9307-11e2-83d9-f29ca3074167.png)