Fixed a bug where trying to access 'type' of unknown response code