alibaba/spring-ai-alibaba · error · BizException
SYSTEM_ERROR
SYSTEM_ERROR
Error message
system error
What it means
getProviderDetail wraps any non-BizException thrown during the provider lookup/conversion in BizException(ErrorCode.SYSTEM_ERROR) with message 'system error'. This is a catch-all for unexpected failures — DB/cache access errors, exceptions in toProviderConfig (e.g. decryption or masking of the API key), NPEs, or RequestContextHolder failures. The original exception is logged (log.error with stack trace) but not exposed to the caller.
Source
Thrown at spring-ai-alibaba-admin/spring-ai-alibaba-admin-server-core/src/main/java/com/alibaba/cloud/ai/studio/core/base/manager/ProviderManager.java:274
*/
public ProviderConfigInfo getProviderDetail(String provider, boolean mask) {
RequestContext context = RequestContextHolder.getRequestContext();
String workspaceId = context == null ? null : context.getWorkspaceId();
try {
ProviderEntity providerEntity = getProviderEntity(provider, workspaceId);
if (providerEntity == null) {
log.error("provider [{}]does not exists.", provider);
throw new BizException(ErrorCode.INVALID_PARAMS.toError("input_params", "provider not found"));
}
return toProviderConfig(providerEntity, mask);
}
catch (BizException e) {
throw e;
}
catch (Exception e) {
log.error("get provider error: {}", e.getMessage(), e);
throw new BizException(ErrorCode.SYSTEM_ERROR.toError());
}
}
/**
* Get provider entity from cache or database
* @param provider Provider ID
* @param workspaceId Workspace ID
* @return Provider entity
*/
private ProviderEntity getProviderEntity(String provider, String workspaceId) {
String key = getProviderCacheKey(provider, workspaceId);
ProviderEntity entity = redisManager.get(key);
if (entity != null) {
if (CACHE_EMPTY_ID.equals(entity.getId())) {
return null;
}
return entity;View on GitHub (pinned to f82da0b50f)
Solutions
- Check the server log for 'get provider error: ...' — it contains the root cause and stack trace
- Verify database and cache connectivity from the admin server
- Inspect the provider row for corrupt credentials and re-save the API key
- After fixing the root cause, retry getProviderDetail
Defensive patterns
Strategy: try-catch
Try / catch
try {
ProviderConfig detail = providerManager.getProviderDetail(provider, mask);
} catch (BizException e) {
if ("system error".equals(e.getMessage())) {
// inspect server log 'get provider error' for root cause; retry after infra check
} else {
throw e;
}
} Prevention
- Monitor database and cache health of the admin server; this error usually means an infra failure
- Keep provider credential data schema-compatible across upgrades to avoid masking/decryption failures
- Check the server-side log for 'get provider error: {}' — the cause never reaches the client response
When it happens
Trigger: Any runtime exception inside getProviderDetail other than the intentional 'provider not found' BizException: database connection failure or query error during getProviderEntity's DB fallback, cache client errors, exceptions thrown by toProviderConfig while masking/decrypting credentials, or a NullPointerException on malformed provider data.
Common situations: Database down or connection pool exhausted; Redis/cache client misconfigured; provider row contains corrupt or legacy-format credentials that fail decryption during masking; serialization mismatch after a schema/version upgrade.
Understand the failure class
Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.
Related errors
AI-assisted analysis of alibaba/spring-ai-alibaba@f82da0b50f (2026-09-09).
Data as JSON: /api/errors/65a116b844dcbdbb.
Report an issue: GitHub.