SonarSource/sonarqube · error · IllegalArgumentException
Issue does not support impact
Error message
Issue does not support impact
What it means
Thrown when setting severity via impact: the requested impact's SoftwareQuality is not among the issue's effective impacts. Only qualities the issue already carries (derived from its rule/type) can have their manual severity changed.
Solutions
- Check the issue's current impacts (GET api/issues/show, impacts field) and only pass qualities listed there
- Use the 'severity' parameter instead if you just want classic severity mapping
- Pick a SoftwareQuality that corresponds to the issue's rule type
Example fix
// before
post('/api/issues/set_severity', {issue: key, impact: 'MAINTAINABILITY,HIGH'}); // issue is RELIABILITY-only
// after
const {issue} = await get('/api/issues/show', {key});
const q = issue.impacts[0].softwareQuality;
post('/api/issues/set_severity', {issue: key, impact: q + ',HIGH'}); Defensive patterns
Strategy: validation
Validate before calling
const {issue} = await get('/api/issues/show', {key});
const supported = issue.impacts.map(i => i.softwareQuality);
if (!supported.includes(requestedQuality)) throw new Error(`issue does not support impact ${requestedQuality}`); Try / catch
try { await post('/api/issues/set_severity', {issue: key, impact}); } catch (e) { if (e.status === 400 && e.message.startsWith('Issue does not support impact')) { /* use a supported quality or the severity param */ } else throw e; } Prevention
- Read the issue's impacts before setting impact severity
- Derive impact quality from the issue's rule type
- Prefer the legacy severity param for simple cases
When it happens
Trigger: Calling POST api/issues/set_severity with impact=SECURITY,MAJOR (or similar) where the given SoftwareQuality is not present in the issue's impacts; e.g. requesting MAINTAINABILITY impact on an issue whose rule maps only to RELIABILITY.
Common situations: Automation applying a fixed impact payload to arbitrary issues; rule changes altering which impacts an issue supports; mixing legacy severity with the new MQR impact model on mismatched issue types.
Understand the failure class
Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.
Related errors
- Cannot resolve issue at line
- Cannot sort on field :
- Component of type ' ' is not supported
- Entity of type ' ' is not supported
- Fail to read locations from DB for issue
AI-assisted analysis of SonarSource/sonarqube@184c821202 (2026-09-09).
Data as JSON: /api/errors/89d1c16439402bd0.
Report an issue: GitHub.
Appendix: source
Thrown at server/sonar-webserver-webapi/src/main/java/org/sonar/server/issue/ws/SetSeverityAction.java:162
SearchResponseData response;
if (severity != null) {
response = setManualSeverity(session, issue, issueDto, severity, context);
} else {
response = setManualImpact(session, issue, issueDto, impact, context);
}
return response;
}
private SearchResponseData setManualImpact(DbSession session, DefaultIssue issue, IssueDto issueDto, String impact,
IssueChangeContext context) {
Map<SoftwareQuality, org.sonar.api.issue.impact.Severity> effectiveImpacts = issueDto.getEffectiveImpacts();
Pair<SoftwareQuality, org.sonar.api.issue.impact.Severity> manualImpact = parseImpact(impact);
org.sonar.api.issue.impact.Severity manualImpactSeverity = manualImpact.getValue();
SoftwareQuality softwareQuality = manualImpact.getKey();
if (!effectiveImpacts.containsKey(softwareQuality)) {
throw new IllegalArgumentException("Issue does not support impact " + softwareQuality);
}
createImpactsIfMissing(issue, effectiveImpacts);
if (issueFieldsSetter.setImpactManualSeverity(issue, softwareQuality, manualImpactSeverity, context)) {
String manualSeverity = null;
boolean severityHasChanged = false;
if (convertToRuleType(softwareQuality) == RuleTypeMapper.toApiRuleType(issue.type())) {
manualSeverity = convertToRuleSeverity(manualImpactSeverity);
severityHasChanged = issueFieldsSetter.setManualSeverity(issue, manualSeverity, context);
}
BranchDto branch = issueUpdater.getBranch(session, issue);
SearchResponseData response = issueUpdater.saveIssueAndPreloadSearchResponseData(session, issueDto, issue, context, branch);
if (branch.getBranchType().equals(BRANCH) && response.getComponentByUuid(issue.projectUuid()) != null) {
issueChangeEventService.distributeIssueChangeEvent(issue, severityHasChanged ? manualSeverity : null, Map.of(softwareQuality, manualImpactSeverity), null, null,
branch, getProjectKey(issue, response));
}
return response;
}
return new SearchResponseData(issueDto);View on GitHub (pinned to 184c821202)