addressed pr comment, updated response errormessage as None