{"record":{"id":"6032b45b52a5bcd4","repo":"projectdiscovery/nuclei","slug":"get-s-unexpected-status-d","errorCode":null,"errorMessage":"get \"%s\": unexpected status %d","messagePattern":"get \"(.+?)\": unexpected status (.+?)","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/catalog/loader/remote_loader.go","lineNumber":100,"sourceCode":"func getRemoteContent(URL string, remoteTemplateDomainList []string, contentType ContentType) RemoteContent {\n\tif err := validateRemoteTemplateURL(URL, remoteTemplateDomainList); err != nil {\n\t\treturn RemoteContent{Error: err}\n\t}\n\tif strings.HasPrefix(URL, \"http\") && stringsutil.HasSuffixAny(URL, extensions.YAML) {\n\t\treturn RemoteContent{\n\t\t\tContent: []string{URL},\n\t\t\tType:    contentType,\n\t\t}\n\t}\n\tresponse, err := retryablehttp.DefaultClient().Get(URL)\n\tif err != nil {\n\t\treturn RemoteContent{Error: err}\n\t}\n\tdefer func() {\n\t\t_ = response.Body.Close()\n\t}()\n\tif response.StatusCode < 200 || response.StatusCode > 299 {\n\t\treturn RemoteContent{Error: fmt.Errorf(\"get \\\"%s\\\": unexpected status %d\", URL, response.StatusCode)}\n\t}\n\n\tscanner := bufio.NewScanner(response.Body)\n\tvar templateList []string\n\tfor scanner.Scan() {\n\t\ttext := strings.TrimSpace(scanner.Text())\n\t\tif text == \"\" {\n\t\t\tcontinue\n\t\t}\n\t\tif utils.IsURL(text) {\n\t\t\tif err := validateRemoteTemplateURL(text, remoteTemplateDomainList); err != nil {\n\t\t\t\treturn RemoteContent{Error: err}\n\t\t\t}\n\t\t}\n\t\ttemplateList = append(templateList, text)\n\t}\n\n\tif err := scanner.Err(); err != nil {","sourceCodeStart":82,"sourceCodeEnd":118,"githubUrl":"https://github.com/projectdiscovery/nuclei/blob/265b3a3dec374741614e342f813c10f8b38d2bb7/pkg/catalog/loader/remote_loader.go#L82-L118","documentation":"Error \"get \"%s\": unexpected status %d\" thrown in projectdiscovery/nuclei.","triggerScenarios":"Thrown at pkg/catalog/loader/remote_loader.go:100 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":"265b3a3dec374741614e342f813c10f8b38d2bb7","analyzedAt":"2026-08-15T20:05:51.855Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}