fixed issue with response.error method