Fix silent exception in response code capture