CORE-5140: fixed the error handling