karatelabs/karate · warning
configure 'lowerCaseResponseHeaders' is deprecated; 'match…
Error message
configure 'lowerCaseResponseHeaders' is deprecated; 'match header X' is already case-insensitive and 'karate.lowerCase(responseHeaders)' covers direct map access
What it means
Karate v2 removed the `configure lowerCaseResponseHeaders` option. Header matching is already case-insensitive and `karate.lowerCase(responseHeaders)` covers direct map access, so the option is a no-op that logs this deprecation warning explaining the built-in replacements.
Solutions
- Delete `configure lowerCaseResponseHeaders` from the feature/config (no replacement needed for match header)
- If direct map access needs lowercase keys, wrap with karate.lowerCase(responseHeaders)
- Update assertions that depended on lowercase keys to use case-insensitive match or karate.lowerCase
- Grep for lowerCaseResponseHeaders across karate-config.js and *.feature and remove all occurrences
Example fix
// before * configure lowerCaseResponseHeaders = true * def h = responseHeaders // after * def h = karate.lowerCase(responseHeaders)
Defensive patterns
Strategy: validation
Validate before calling
grep -rn 'lowerCaseResponseHeaders' karate-config.js features/ && echo 'deprecated configure key found'
Prevention
- Rely on case-insensitive `match header` instead of lowercasing maps
- Use karate.lowerCase(responseHeaders) only where direct map access needs lowercase keys
- Write header assertions that don't depend on key casing
- Sweep configs for removed v1 keys as part of upgrade checklists
When it happens
Trigger: A feature or JS config containing `configure lowerCaseResponseHeaders = true`, typically copied from a Karate v1 project that needed lowercased response header maps.
Common situations: v1→v2 migration of karate-config.js; tests asserting exact header map keys that relied on the old lowercasing; copied snippets from older codebases.
Understand the failure class
Background: "is deprecated and will be removed" — deprecation warnings for old API names, keywords, and options, and how to migrate before the removal release — this error's family across 29 libraries.
Related errors
- configure ' ' is deprecated; use 'configure logging = }
- configure 'printEnabled' is deprecated; print/karate.log go…
- configure 'logModifier' is removed; use the declarative…
- 'configure report = ' is no longer supported; use…
- 'output.logLevel' is no longer supported in…
AI-assisted analysis of karatelabs/karate@a22eb90246 (2026-09-12).
Data as JSON: /api/errors/17c61dd496ab74f8.
Report an issue: GitHub.
Appendix: source
Thrown at karate-core/src/main/java/io/karatelabs/core/KarateConfig.java:446
this.onStepFailure = value;
}
// Driver configuration
case "driver" -> {
this.driverConfig = value;
}
// Deprecated v1 options - no-op with one-line migration hint
case "logPrettyRequest", "logPrettyResponse" -> {
logger.warn("configure '{}' is deprecated; use 'configure logging = {{ pretty: true|false }}'", key);
}
case "printEnabled" -> {
logger.warn("configure 'printEnabled' is deprecated; print/karate.log go to the 'karate.scenario' "
+ "SLF4J category - set its level to WARN in logback.xml to keep them off the console, "
+ "or 'configure logging = {{ console: \"warn\" }}' to quiet all karate console output");
}
case "lowerCaseResponseHeaders" -> {
logger.warn("configure 'lowerCaseResponseHeaders' is deprecated; "
+ "'match header X' is already case-insensitive and 'karate.lowerCase(responseHeaders)' "
+ "covers direct map access");
}
case "logModifier" -> {
logger.warn("configure 'logModifier' is removed; "
+ "use the declarative form: 'configure logging = {{ mask: {{ headers: [...], jsonPaths: [...], patterns: [...] }} }}'");
}
// No channel-type cases: channels (grpc, kafka, …) are configured via their rich
// JS object — karate.channel('kafka') / the boot.ext('kafka') object — not via global
// 'configure <type>'. 'configure' stays strict so key typos fail loudly.
default -> throw new RuntimeException("unexpected 'configure' key: '" + key + "'");
}
}
private void configureSsl(Object value) {
if (value == null) {
this.ssl.clear();View on GitHub (pinned to a22eb90246)