handle client error more generally