improve error handling push/pull