Improve error handling and error message for push/pull/sync