Redirect and show a flash msg whenever an http error occurs