Improved the error message for incompatible protocol versions

#1176
Made changes as per code review feedback

#1176