n.v.harikrishna created CASSANDRASC-91: ------------------------------------------
Summary: AbstractHandler is handling the request even when it fails to extract params Key: CASSANDRASC-91 URL: https://issues.apache.org/jira/browse/CASSANDRASC-91 Project: Sidecar for Apache Cassandra Issue Type: Bug Reporter: n.v.harikrishna Assignee: n.v.harikrishna AbstractHandler’s handle method is calling extractParamsOrThrow method to parse the request which can fail with HttpException (a runtime exception). When extraction fails, then AbstractHandler is processing the failure using processFailure method and continued to call handleInternal method. Calling handlerInternal even when failed to extract params resulting unwanted results. If the extraction of parameters failes, then AbstractHandler should not call handleInternal. Example: Passing an invalid character for ring route per keysapce endpoint (handled by RingHandler which is extending AbstractHandler) something like : [localhost1:9043/api/v1/cassandra/ring/keyspaces/keysapce%60] is resulting to _Bad Request_ response, but also resulting NPE from the RingHandler.handleInternal method java.lang.NullPointerException: null at org.apache.cassandra.sidecar.routes.RingHandler.lambda$handleInternal$0(RingHandler.java:83) at io.vertx.core.impl.ContextBase.lambda$executeBlocking$1(ContextBase.java:180) at io.vertx.core.impl.ContextInternal.dispatch(ContextInternal.java:277) at io.vertx.core.impl.ContextBase.lambda$internalExecuteBlocking$2(ContextBase.java:199) at io.vertx.core.impl.TaskQueue.run(TaskQueue.java:76) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) at java.lang.Thread.run(Thread.java:748) It should terminate processing the request when it could not parse the keyspace. -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org