react on server response with alert