fixed reporting of "undefined" response code