CORE-5140: fixed the error handling
Merge branch 'master' into dev