replace error() w/ middleware, add imperfect isPouchError()