You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a custom ErrorWriterPolicy.
I put a parameter in config.json file, like this: "apiman-gateway": { "writers": { "error": { "class": "plugin:com.test.apiman.plugins:apiman-plugins-failure-error-policy:2.1.0.Final/com.test.apiman.plugins.failure_error_plugin.PolicyErrorWriter", "config": { "useTransactionStatus": "false" } }, } },
This parameter is not handled by plugin.
I have investigated a source code and can not understand //https://github.com/apiman/apiman/blob/master/gateway/platforms/vertx3/vertx3/src/main/java/io/apiman/gateway/platforms/vertx3/common/config/VertxEngineConfig.java#L222 public Map<String, String> getPolicyErrorWriterConfig() { return getConfig(config, GatewayConfigProperties.ERROR_WRITER_CLASS); }
GatewayConfigProperties.ERROR_WRITER_CLASS = "apiman-gateway.writers.error"
but later //https://github.com/apiman/apiman/blob/master/gateway/platforms/vertx3/vertx3/src/main/java/io/apiman/gateway/platforms/vertx3/common/config/VertxEngineConfig.java#L380 return toFlatStringMap(obj.getJsonObject(prefix, new JsonObject()).getJsonObject(GATEWAY_CONFIG));
getJsonObject accepts a map key, not composite map key with dots...
Apiman version 2.1.0 on vert.x
How can I set up config for error writer policy plugin?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have a custom ErrorWriterPolicy.
I put a parameter in config.json file, like this:
"apiman-gateway": { "writers": { "error": { "class": "plugin:com.test.apiman.plugins:apiman-plugins-failure-error-policy:2.1.0.Final/com.test.apiman.plugins.failure_error_plugin.PolicyErrorWriter", "config": { "useTransactionStatus": "false" } }, } },
This parameter is not handled by plugin.
I have investigated a source code and can not understand
//https://github.com/apiman/apiman/blob/master/gateway/platforms/vertx3/vertx3/src/main/java/io/apiman/gateway/platforms/vertx3/common/config/VertxEngineConfig.java#L222 public Map<String, String> getPolicyErrorWriterConfig() { return getConfig(config, GatewayConfigProperties.ERROR_WRITER_CLASS); }
GatewayConfigProperties.ERROR_WRITER_CLASS = "apiman-gateway.writers.error"
but later
//https://github.com/apiman/apiman/blob/master/gateway/platforms/vertx3/vertx3/src/main/java/io/apiman/gateway/platforms/vertx3/common/config/VertxEngineConfig.java#L380 return toFlatStringMap(obj.getJsonObject(prefix, new JsonObject()).getJsonObject(GATEWAY_CONFIG));
getJsonObject accepts a map key, not composite map key with dots...
Apiman version 2.1.0 on vert.x
How can I set up config for error writer policy plugin?
Beta Was this translation helpful? Give feedback.
All reactions