add response code to promise answer