wtfutil/wtf · error
no conversion result for username: %s
Error message
no conversion result for username: %s
What it means
After successfully parsing the pdcleaner response, ConvertJQLWithUsername requires at least one entry in conversionResult.QueryStrings. If Jira returns a 200 with an empty conversion list, there is no converted JQL to use, so the library fails with the username in the message. It usually means Jira could not map the username to an account.
Source
Thrown at modules/jira/client.go:140
jsonData, err := json.Marshal(requestBody)
if err != nil {
return "", fmt.Errorf("failed to marshal request: %v", err)
}
// Make the POST request to the JQL conversion API
resp, err := widget.jiraPostRequest("/rest/api/3/jql/pdcleaner", jsonData)
if err != nil {
return "", err
}
var conversionResult JQLConversionResponse
err = utils.ParseJSON(&conversionResult, bytes.NewReader(resp))
if err != nil {
return "", err
}
if len(conversionResult.QueryStrings) == 0 {
return "", fmt.Errorf("no conversion result for username: %s", username)
}
// Return the converted JQL query part (just the assignee part)
convertedQuery := conversionResult.QueryStrings[0].ConvertedQuery
// Extract account ID properly
accountID := extractAccountIDFromJQL(convertedQuery)
if accountID == "" {
return "", fmt.Errorf("failed to extract account ID from converted query: %s", convertedQuery)
}
// Cache the result for 10 minutes
userIDCache.Set(username, accountID, 10*time.Minute)
return convertedQuery, nil
}
// extractAccountIDFromJQL extracts the account ID from a converted JQL queryView on GitHub (pinned to bb838c1ccb)
Solutions
- Verify the username exists and is active in the Jira Cloud site
- Use the Jira user's account_id or exact username as configured in the widget settings
- Check the Jira API token permissions for the site
- Clear the userIDCache and retry after fixing the username
Example fix
# widget config # before username: John Doe # after username: jdoe@example.com
Defensive patterns
Strategy: validation
Validate before calling
// pre-check the username is a plausible Jira identifier before conversion
if username == "" || strings.ContainsAny(username, " ") && !strings.Contains(username, "@") {
return fmt.Errorf("username %q unlikely to resolve; use email or exact username", username)
} Try / catch
query, err := widget.ConvertJQLWithUsername(username)
if err != nil {
if strings.Contains(err.Error(), "no conversion result") {
log.Printf("user %q not resolvable in Jira - check account status/permissions", username)
}
return err
} Prevention
- Configure the exact Jira username or account_id, not a display name
- Confirm the user is active in the target Jira Cloud site
- Ensure the API token's site has access to that user
- Invalidate the userIDCache after fixing user config
When it happens
Trigger: The Jira account ID lookup returns successfully but the queryStrings array is empty - typically when the username doesn't match any user, or the API token lacks permission to resolve that user.
Common situations: Username contains a display name instead of the actual account identifier, the user was deactivated in Jira Cloud, the API token's site lacks access to that user, or Jira changed pdcleaner response semantics after a API version change.
Understand the failure class
Background: "empty response", "returned no data", "empty embeddings": what HTTP 200-with-empty-body errors mean across libraries — this error's family across 36 libraries.
Related errors
- failed to convert username %s to account ID: %v
- JIRA search failed: %v
- errors.New(msg.Msg)
- errors.New(hibpErr.Message)
- %s
AI-assisted analysis of wtfutil/wtf@bb838c1ccb (2026-09-03).
Data as JSON: /api/errors/2047dcfeac0b7fa5.
Report an issue: GitHub.