{"record":{"id":"d924bca096d753ab","repo":"wtfutil/wtf","slug":"jira-api-error-s-s-url-s","errorCode":null,"errorMessage":"JIRA API error - %s: %s (URL: %s)","messagePattern":"JIRA API error - (.+?): (.+?) \\(URL: (.+?)\\)","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"modules/jira/client.go","lineNumber":315,"sourceCode":"\n\thttpClient := &http.Client{\n\t\tTransport: &http.Transport{\n\t\t\tTLSClientConfig: &tls.Config{\n\t\t\t\tInsecureSkipVerify: !widget.settings.verifyServerCertificate,\n\t\t\t},\n\t\t\tProxy: http.ProxyFromEnvironment,\n\t\t},\n\t}\n\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\tbody, _ := io.ReadAll(resp.Body)\n\t\treturn nil, fmt.Errorf(\"JIRA API error - %s: %s (URL: %s)\", resp.Status, string(body), url)\n\t}\n\n\tbody, err := io.ReadAll(resp.Body)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn body, nil\n}\n\nfunc (widget *Widget) jiraPostRequest(path string, data []byte) ([]byte, error) {\n\turl := fmt.Sprintf(\"%s%s\", widget.settings.domain, path)\n\n\treq, err := http.NewRequest(\"POST\", url, bytes.NewBuffer(data))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n","sourceCodeStart":297,"sourceCodeEnd":333,"githubUrl":"https://github.com/wtfutil/wtf/blob/bb838c1ccb0f0f3223690df44afdec663d622881/modules/jira/client.go#L297-L333","documentation":"Raised in jiraRequest when the JIRA REST API returns a non-2xx status: the error carries the HTTP status line, the raw response body, and the request URL. Fires for authentication failures (401/403), missing resources (404), bad JQL (400), rate limiting, and server errors.","triggerScenarios":"Thrown at modules/jira/client.go:315 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the JIRA credentials (API token / username) are valid for the configured host","Inspect the response body included in the error — JIRA usually explains the problem there","Validate the JQL query and project/issue identifiers","Check for rate limiting or Atlassian status page incidents"],"exampleFix":null,"handlingStrategy":"fallback","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"}