SonarSource/sonarqube · error · IllegalArgumentException
unsupported DevOps Platform
Error message
unsupported DevOps Platform %s
What it means
IllegalArgumentException thrown by CheckPatAction.doHandle when the ALM setting's platform type (almSettingDto.getAlm()) is not one of the explicitly handled DevOps platforms (e.g. Azure DevOps, Bitbucket Server/Cloud); GITHUB and any unknown value fall into the default case. The endpoint validates a personal access token only for supported platforms.
Solutions
- Use the GitHub-specific validation path (validate the token via the GitHub app settings flow) instead of this endpoint
- Verify the alm setting's type in Administration > DevOps Platform integrations
- Correct any corrupted alm value in the ALM_SETTINGS table
- Upgrade SonarQube if a newer version supports this platform for PAT validation
Defensive patterns
Strategy: validation
Validate before calling
// client-side guard: only call check_pat for supported ALM types
Set<String> supported = Set.of("azure", "bitbucket", "bitbucketcloud", "bitbucketserver");
if (!supported.contains(almType.toLowerCase())) {
throw new IllegalArgumentException("PAT validation unsupported for " + almType);
} Try / catch
try {
api.checkPat(almSettingId, pat);
} catch (ServerErrorException e) { // 400/500 mapped from IllegalArgumentException
// fall back to platform-specific validation (e.g. GitHub app token check)
} Prevention
- Check the integration type before invoking PAT validation
- Use the GitHub-specific validation flow for GitHub integrations
- Avoid manually editing alm values in the database
When it happens
Trigger: Calling the check PAT Web API (api/alm_integration/check_pat or equivalent) with an almSettings configured for GitHub, or with a corrupted/unknown alm value in the ALM_SETTINGS table.
Common situations: Admins mistakenly testing a GitHub PAT through the PAT validation endpoint, legacy/unknown enum values in alm settings after upgrades or manual DB edits.
Related errors
- Invalid message type:
- Unexpected message type:
- UNSUPPORTED_DATABASE_MIGRATION_STATUS
- Unsupported WorkersPauseStatus
- a JVM option can't be empty and must start with '-'. The…
AI-assisted analysis of SonarSource/sonarqube@184c821202 (2026-09-09).
Data as JSON: /api/errors/cf2b556f7193f4d1.
Report an issue: GitHub.
Appendix: source
Thrown at server/sonar-webserver-webapi/src/main/java/org/sonar/server/almintegration/ws/CheckPatAction.java:128
case BITBUCKET:
// Do an authenticate call to Bitbucket Server to validate that the user's personal access token is valid
bitbucketServerRestClient.getRecentRepo(
requireNonNull(almSettingDto.getUrl(), URL_CANNOT_BE_NULL),
requireNonNull(almPatDto.getPersonalAccessToken(), PAT_CANNOT_BE_NULL));
break;
case GITLAB:
gitlabApplicationClient.checkReadPermission(
requireNonNull(almSettingDto.getUrl(), URL_CANNOT_BE_NULL),
requireNonNull(almPatDto.getPersonalAccessToken(), PAT_CANNOT_BE_NULL));
break;
case BITBUCKET_CLOUD:
bitbucketCloudRestClient.validateApiToken(
requireNonNull(almPatDto.getPersonalAccessToken(), API_TOKEN_CANNOT_BE_NULL),
requireNonNull(almSettingDto.getAppId(), WORKSPACE_CANNOT_BE_NULL));
break;
case GITHUB:
default:
throw new IllegalArgumentException(String.format("unsupported DevOps Platform %s", almSettingDto.getAlm()));
}
}
}
}
View on GitHub (pinned to 184c821202)