fix parsing resp-text-code on tagged error responses
modify regular expressions used for untagged responses to ignore trailing whitespace