{"record":{"id":"c57b293526868351","repo":"wtfutil/wtf","slug":"s-c57b29","errorCode":null,"errorMessage":"%s","messagePattern":"%s","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"modules/stocks/finnhub/client.go","lineNumber":76,"sourceCode":"\n\turl := finnhubURL.ResolveReference(&url.URL{RawQuery: params.Encode()})\n\n\treq, err := http.NewRequest(\"GET\", url.String(), http.NoBody)\n\treq.Header.Add(\"Accept\", \"application/json\")\n\treq.Header.Add(\"Content-Type\", \"application/json\")\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\thttpClient := &http.Client{}\n\tresp, err := httpClient.Do(req)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer func() { _ = resp.Body.Close() }()\n\n\tif resp.StatusCode < 200 || resp.StatusCode > 299 {\n\t\treturn nil, fmt.Errorf(\"%s\", resp.Status)\n\t}\n\n\treturn resp, nil\n}\n","sourceCodeStart":58,"sourceCodeEnd":81,"githubUrl":"https://github.com/wtfutil/wtf/blob/bb838c1ccb0f0f3223690df44afdec663d622881/modules/stocks/finnhub/client.go#L58-L81","documentation":"Raised in finnhubRequest when the Finnhub API returns a non-2xx status: the error is only the HTTP status string (e.g. '401 Unauthorized'), no body. Typical causes are an invalid/expired API token, exceeded rate limit, or an unsupported symbol.","triggerScenarios":"Thrown at modules/stocks/finnhub/client.go:76 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the Finnhub API token configured for the widget is valid","Check the ticker/symbol passed to Getquote exists on Finnhub","Back off and retry on 429 rate-limit responses","Check Finnhub plan limits if requests are being rejected"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"bb838c1ccb0f0f3223690df44afdec663d622881","analyzedAt":"2026-09-03T17:02:45.030Z","contentChangedAt":"2026-09-03T17:02:45.030Z","schemaVersion":2},"datasetVersion":"2026-09-11T00:17:11.886Z"}