save response code and message