fixes #7155 - ensure displayMessage is present

fixed rubocop

updated status code check to >= 400