apache/shenyu · error · ResponsiveException
-114
-114
Error message
Please check Cryptor request plugin's [fieldNames]
What it means
The cryptor-request plugin found a matched rule/selector but the configuration has no 'fieldNames' entry, so it does not know which JSON fields to encrypt or decrypt. The abstract cryptor handler treats this as an unrecoverable configuration error and throws a ResponsiveException with code -114 (CRYPTOR_REQUEST_ERROR_CONFIGURATION) appended with '[fieldNames]'. It indicates a bad plugin rule configuration on the ShenYu admin side, not a problem with the incoming request.
Solutions
- Open the ShenYu admin dashboard, find the cryptor-request plugin rule that matched this request, and set the 'fieldNames' property (comma-separated list of JSON fields to encrypt/decrypt).
- If you cannot identify the rule, temporarily enable debug logging on the cryptor plugin to see which selector/rule matched, then fix that rule's config.
- Check the rule data stored in the database (plugin_rule table) for the cryptor plugin and add the missing fieldNames key, then trigger a config sync to the gateway.
- If the rule should not apply to this path, adjust the selector/rule match conditions so the request no longer hits the misconfigured rule.
Example fix
// rule config before (admin rule JSON)
{"strategy":"encrypt","digestAlgorithm":"MD5"}
// after
{"strategy":"encrypt","digestAlgorithm":"MD5","fieldNames":"password,phone"} Defensive patterns
Strategy: validation
Validate before calling
// Before creating/updating a cryptor-request rule (admin side)
Object fieldNames = ruleConfig.get("fieldNames");
if (fieldNames == null || fieldNames.toString().isBlank()) {
throw new IllegalArgumentException("cryptor-request rule requires non-empty fieldNames");
} Try / catch
try {
return chain.execute(exchange);
} catch (ResponsiveException e) {
if (e.getCode() == -114) { /* fix rule config: missing fieldNames */ }
throw e;
} Prevention
- Always fill fieldNames when configuring cryptor-request rules in the dashboard.
- Add a save-time validation in admin for cryptor rule configs.
- After DB edits, verify the synced rule JSON contains fieldNames before routing traffic.
When it happens
Trigger: A request matches a cryptor-request selector/rule whose RuleData was created without the 'fieldNames' field being set in the admin dashboard (or the fieldNames JSON key was removed/renamed when editing the rule config).
Common situations: Operators hand-editing rule JSON in the admin console and omitting fieldNames; data-sync producing a rule with an empty fieldNames; version upgrades where the cryptor rule schema keys changed but old DB rows were not migrated.
Understand the failure class
Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.
Related errors
- Cannot find the context path(AppName) from the request url
- shenyu.jwt.secretKey is not configured. In a multi-instance…
- shenyu discovery mode current didn't support
- websocket on client open failed, namespaceId is null
- websocket sync token is not configured
AI-assisted analysis of apache/shenyu@567142e072 (2026-09-12).
Data as JSON: /api/errors/cd05a3123f7ab13e.
Report an issue: GitHub.
Appendix: source
Thrown at shenyu-plugin/shenyu-plugin-security/shenyu-plugin-cryptor/src/main/java/org/apache/shenyu/plugin/cryptor/plugin/CryptorRequestPlugin.java:72
return ServerWebExchangeUtils.rewriteRequestBody(exchange, messageReaders, originalBody ->
Mono.just(convert(originalBody, ruleHandle, exchange))
).flatMap(chain::execute)
.onErrorResume(error -> {
if (error instanceof ResponsiveException) {
return WebFluxResultUtils.failedResult((ResponsiveException) error);
}
return Mono.error(error);
});
}
@Override
protected ShenyuResultEnum checkErrorEnum() {
return ShenyuResultEnum.CRYPTOR_REQUEST_ERROR_CONFIGURATION;
}
@Override
protected String fieldErrorParse(final String originalBody, final ServerWebExchange exchange) {
throw new ResponsiveException(ShenyuResultEnum.CRYPTOR_REQUEST_ERROR_CONFIGURATION.getCode(), ShenyuResultEnum.CRYPTOR_REQUEST_ERROR_CONFIGURATION.getMsg() + "[fieldNames]", exchange);
}
@Override
public int getOrder() {
return PluginEnum.CRYPTOR_REQUEST.getCode();
}
@Override
public String named() {
return PluginEnum.CRYPTOR_REQUEST.getName();
}
}
View on GitHub (pinned to 567142e072)