send the whole response when error occurs