refactors handling for warning responses