{"record":{"id":"18b62c604d8c3f50","repo":"wtfutil/wtf","slug":"jira-api-post-error-s-s-url-s","errorCode":null,"errorMessage":"JIRA API POST error - %s: %s (URL: %s)","messagePattern":"JIRA API POST error - (.+?): (.+?) \\(URL: (.+?)\\)","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"modules/jira/client.go","lineNumber":358,"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 POST 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 getProjectQuery(projects []string) string {\n\tsingleEmptyProject := len(projects) == 1 && projects[0] == \"\"\n\tif len(projects) == 0 || singleEmptyProject {\n\t\treturn \"\"\n\t} else if len(projects) == 1 {\n\t\treturn buildJql(\"project\", projects[0])\n\t}\n","sourceCodeStart":340,"sourceCodeEnd":376,"githubUrl":"https://github.com/wtfutil/wtf/blob/bb838c1ccb0f0f3223690df44afdec663d622881/modules/jira/client.go#L340-L376","documentation":"Raised in jiraPostRequest when a POST to the JIRA API returns a non-2xx status: includes the HTTP status, response body, and URL. Used by JQL conversion; typically fires on authentication failure, malformed request payload, or server-side rejection.","triggerScenarios":"Thrown at modules/jira/client.go:358 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify JIRA credentials and that the token has permission for the endpoint","Inspect the response body in the error message for JIRA's rejection reason","Check that the POST payload matches the API version of the configured JIRA instance (Cloud vs Server)","Retry later if the status indicates a server-side (5xx) issue"],"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"}