alibaba/spring-ai-alibaba · error · BizException
MISSING_PARAMS
MISSING_PARAMS
Error message
pluginId
What it means
MISSING_PARAMS BizException from PluginController.deletePlugin when the {pluginId} path variable is null. pluginId identifies the plugin to delete; the controller performs a null check (note: not a blank-string check) and rejects with a named-field business error before calling pluginService.deletePlugin.
Source
Thrown at spring-ai-alibaba-admin/spring-ai-alibaba-admin-server-start/src/main/java/com/alibaba/cloud/ai/studio/admin/builder/controller/PluginController.java:107
public Result<Void> updatePlugin(@PathVariable("pluginId") String pluginId, @RequestBody Plugin request) {
RequestContext context = RequestContextHolder.getRequestContext();
validatePlugin(request);
request.setPluginId(pluginId);
pluginService.updatePlugin(request);
return Result.success(context.getRequestId(), null);
}
/**
* Deletes a plugin
* @param pluginId ID of the plugin to delete
*/
@DeleteMapping("/plugins/{pluginId}")
public Result<Void> deletePlugin(@PathVariable("pluginId") String pluginId) {
RequestContext context = RequestContextHolder.getRequestContext();
if (Objects.isNull(pluginId)) {
throw new BizException(ErrorCode.MISSING_PARAMS.toError("pluginId"));
}
pluginService.deletePlugin(pluginId);
return Result.success(context.getRequestId(), null);
}
/**
* Retrieves a plugin by ID
* @param pluginId ID of the plugin to retrieve
* @return Plugin details
*/
@GetMapping("/plugins/{pluginId}")
public Result<Plugin> getPlugin(@PathVariable("pluginId") String pluginId) {
RequestContext context = RequestContextHolder.getRequestContext();
if (Objects.isNull(pluginId)) {
throw new BizException(ErrorCode.MISSING_PARAMS.toError("pluginId"));
}View on GitHub (pinned to f82da0b50f)
Solutions
- Supply the real pluginId in the DELETE path: /plugins/{pluginId}.
- Fetch the id from the plugin list endpoint if unknown.
- Client-side: skip/throw when pluginId is null or empty before building the URL.
Example fix
// before
await api.delete(`/plugins/${pluginId}`); // pluginId null -> DELETE /plugins/
// after
if (!pluginId) throw new Error('pluginId required');
await api.delete(`/plugins/${encodeURIComponent(pluginId)}`); Defensive patterns
Strategy: validation
Validate before calling
if (pluginId == null || pluginId === '') throw new Error('pluginId is required to delete a plugin'); Type guard
function hasPluginId(p) { return typeof p === 'string' && p.trim() !== ''; } Try / catch
try {
await api.deletePlugin(pluginId);
} catch (e) {
if (e.code === 'MISSING_PARAMS' && e.message === 'pluginId') {
// refresh plugin list and re-bind the row id
} else throw e;
} Prevention
- Bind delete actions to the row's id field explicitly, not a generic record key.
- Check id presence before enabling destructive actions.
- Note the controller only null-checks here — always send a real id string.
When it happens
Trigger: DELETE to /plugins/ with a missing or null pluginId path segment, typically from a client interpolating an unset variable into the URL.
Common situations: JS template strings with an undefined pluginId; table row actions wired to the wrong data key; replayed requests after the plugin record's id was renamed.
Related errors
AI-assisted analysis of alibaba/spring-ai-alibaba@f82da0b50f (2026-09-09).
Data as JSON: /api/errors/6b4ad60c3e72ab43.
Report an issue: GitHub.