{"record":{"id":"859250b59c874502","repo":"projectdiscovery/subfinder","slug":"s-code-d","errorCode":null,"errorMessage":"%s (code %d)","messagePattern":"(.+?) \\(code (.+?)\\)","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/subscraping/sources/digitalyama/digitalyama.go","lineNumber":83,"sourceCode":"\t\t}()\n\n\t\tif resp.StatusCode != 200 {\n\t\t\tvar errResponse struct {\n\t\t\t\tDetail []struct {\n\t\t\t\t\tLoc  []string `json:\"loc\"`\n\t\t\t\t\tMsg  string   `json:\"msg\"`\n\t\t\t\t\tType string   `json:\"type\"`\n\t\t\t\t} `json:\"detail\"`\n\t\t\t}\n\t\t\terr = jsoniter.NewDecoder(resp.Body).Decode(&errResponse)\n\t\t\tif err != nil {\n\t\t\t\tresults <- subscraping.Result{Source: s.Name(), Type: subscraping.Error, Error: fmt.Errorf(\"unexpected status code %d\", resp.StatusCode)}\n\t\t\t\ts.errors++\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif len(errResponse.Detail) > 0 {\n\t\t\t\terrMsg := errResponse.Detail[0].Msg\n\t\t\t\tresults <- subscraping.Result{Source: s.Name(), Type: subscraping.Error, Error: fmt.Errorf(\"%s (code %d)\", errMsg, resp.StatusCode)}\n\t\t\t} else {\n\t\t\t\tresults <- subscraping.Result{Source: s.Name(), Type: subscraping.Error, Error: fmt.Errorf(\"unexpected status code %d\", resp.StatusCode)}\n\t\t\t}\n\t\t\ts.errors++\n\t\t\treturn\n\t\t}\n\n\t\tvar response digitalYamaResponse\n\t\terr = jsoniter.NewDecoder(resp.Body).Decode(&response)\n\t\tif err != nil {\n\t\t\tresults <- subscraping.Result{Source: s.Name(), Type: subscraping.Error, Error: err}\n\t\t\ts.errors++\n\t\t\treturn\n\t\t}\n\n\t\tfor _, subdomain := range response.Subdomains {\n\t\t\tselect {\n\t\t\tcase <-ctx.Done():","sourceCodeStart":65,"sourceCodeEnd":101,"githubUrl":"https://github.com/projectdiscovery/subfinder/blob/7a0b91f0fac01b62c65328bd771a3560ae611d6a/pkg/subscraping/sources/digitalyama/digitalyama.go#L65-L101","documentation":"API-level error from the DigitalYama passive source: the HTTP response carried a non-200 status and a JSON body with a detail array; the first detail item's message is interpolated as the error text with the status code. It signals the server rejected the request (bad key, bad domain, quota) rather than a transport failure.","triggerScenarios":"Thrown at pkg/subscraping/sources/digitalyama/digitalyama.go:83 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the API message in the error text — it usually identifies an invalid API key or malformed domain","Verify the DigitalYama API key supplied via keys configuration","If the status suggests rate limiting, wait and retry the domain later","Skip this source for the run and rely on the other passive sources for coverage"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7a0b91f0fac01b62c65328bd771a3560ae611d6a","analyzedAt":"2026-09-06T23:52:02.109Z","contentChangedAt":"2026-09-06T23:52:02.109Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}