halo-dev/halo · warning · ServerWebInputException
Unable to complete the request because the plugin configMapN
Error message
Unable to complete the request because the plugin configMapName is blank
What it means
PluginEndpoint.updatePluginJsonConfig fetches the named plugin and, inside doOnNext, throws ServerWebInputException (HTTP 400) when the plugin's spec.configMapName is blank. Plugins only expose a JSON config editor when they declare a configMapName; without one there is no config to read or write, so the update cannot proceed.
Source
Thrown at application/src/main/java/run/halo/app/core/endpoint/console/PluginEndpoint.java:307
.response(responseBuilder().implementation(String.class)))
.build();
}
private Mono<ServerResponse> fetchPluginJsonConfig(ServerRequest request) {
final var name = request.pathVariable("name");
return client.fetch(Plugin.class, name)
.mapNotNull(plugin -> plugin.getSpec().getConfigMapName())
.flatMap(settingConfigService::fetchConfig)
.flatMap(json -> ServerResponse.ok().bodyValue(json));
}
private Mono<ServerResponse> updatePluginJsonConfig(ServerRequest request) {
final var pluginName = request.pathVariable("name");
return client.fetch(Plugin.class, pluginName)
.doOnNext(plugin -> {
String configMapName = plugin.getSpec().getConfigMapName();
if (!StringUtils.hasText(configMapName)) {
throw new ServerWebInputException(
"Unable to complete the request because the plugin configMapName is blank");
}
})
.flatMap(plugin -> {
final String configMapName = plugin.getSpec().getConfigMapName();
return request.bodyToMono(ObjectNode.class)
.switchIfEmpty(Mono.error(new ServerWebInputException("Required request body is missing")))
.flatMap(configMapJsonData ->
settingConfigService.upsertConfig(configMapName, configMapJsonData));
})
.then(ServerResponse.noContent().build());
}
Mono<ServerResponse> changePluginRunningState(ServerRequest request) {
final var name = request.pathVariable("name");
return request.bodyToMono(RunningStateRequest.class)
.flatMap(runningState -> {
var enable = runningState.isEnable();View on GitHub (pinned to d2f5165f9c)
Solutions
- Confirm the plugin actually defines a Setting and has a configMapName set in its spec before calling the JSON config endpoint.
- If you maintain the plugin, ensure spec.configMapName is populated when the plugin has settings.
- On the client, hide the JSON config action for plugins whose configMapName is blank.
Defensive patterns
Strategy: validation
Validate before calling
if (!StringUtils.hasText(plugin.getSpec().getConfigMapName())) {
return Mono.error(new ServerWebInputException(
"Unable to complete the request because the plugin configMapName is blank"));
} Type guard
static boolean pluginHasJsonConfig(Plugin p) {
return p != null && StringUtils.hasText(p.getSpec().getConfigMapName());
} Prevention
- Hide the JSON config editor for plugins whose configMapName is blank.
- As a plugin author, set configMapName when your plugin defines settings.
- Check the plugin's Setting/configMapName before calling the endpoint.
When it happens
Trigger: PUT/POST to the plugin JSON config endpoint for a plugin whose spec.configMapName is unset or empty — typically a plugin with no setting/configMap wired up, or a not-yet-fully-initialized plugin.
Common situations: Calling the JSON config endpoint on a plugin that has no settings defined; a plugin whose configMapName was cleared; UI showing the config editor for a non-configurable plugin.
Related errors
- The name from the request body does not match the plugin con
- Form field file is required
- Invalid parameter of file
- Invalid attachment
- User permissions not set in PermissionUtils
AI-assisted analysis of halo-dev/halo@d2f5165f9c (2026-08-14).
Data as JSON: /api/errors/1eb5930660e3a37e.
Report an issue: GitHub.