{"record":{"id":"ac01e401eccc1b22","repo":"hashicorp/vagrant","slug":"an-authorization-error-occurred-while-connecting-t","errorCode":null,"errorMessage":"An authorization error occurred while connecting to WinRM.\n\nUser: %{user}\nEndpoint: %{endpoint}\nMessage: %{message}","messagePattern":"An authorization error occurred while connecting to WinRM\\.\n\nUser: %(.+?)\nEndpoint: %(.+?)\nMessage: %(.+?)","errorType":"exception","errorClass":"VagrantPlugins::CommunicatorWinRM::Errors::AuthenticationFailed","httpStatus":null,"severity":"error","filePath":"plugins/communicators/winrm/shell.rb","lineNumber":170,"sourceCode":"        @logger.debug(\"Output: #{output.inspect}\")\n\n        # Verify that we didn't get a parser error, and if so we should\n        # set the exit code to 1. Parse errors return exit code 0 so we\n        # need to do this.\n        if output.exitcode == 0\n          if output.stderr.include?(\"ParserError\")\n            @logger.warn(\"Detected ParserError, setting exit code to 1\")\n            output.exitcode = 1\n          end\n        end\n\n        return output\n      end\n\n      def raise_winrm_exception(exception, shell = nil, command = nil)\n        case exception\n        when WinRM::WinRMAuthorizationError\n          raise Errors::AuthenticationFailed,\n              user: @config.username,\n              password: @config.password,\n              endpoint: endpoint,\n              message: exception.message\n        when WinRM::WinRMHTTPTransportError\n          raise Errors::ExecutionError,\n            shell: shell,\n            command: command,\n            message: exception.message\n        when OpenSSL::SSL::SSLError\n          raise Errors::SSLError, message: exception.message\n        when HTTPClient::TimeoutError\n          raise Errors::ConnectionTimeout, message: exception.message\n        when IO::TimeoutError\n          raise Errors::ConnectionTimeout\n        when Errno::ETIMEDOUT\n          raise Errors::ConnectionTimeout\n          # This is raised if the connection timed out","sourceCodeStart":152,"sourceCodeEnd":188,"githubUrl":"https://github.com/hashicorp/vagrant/blob/35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5/plugins/communicators/winrm/shell.rb#L152-L188","documentation":"Error \"An authorization error occurred while connecting to WinRM.\n\nUser: %{user}\nEndpoint: %{endpoint}\nMessage: %{message}\" thrown in hashicorp/vagrant.","triggerScenarios":"Thrown at plugins/communicators/winrm/shell.rb:170 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5","analyzedAt":"2026-08-21T13:34:32.514Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}