**Build scan:**
https://gradle-enterprise.elastic.co/s/k2skwazrmhszm/tests/:x-pack:plugin:ent-search:qa:rest:yamlRestTest/org.elasticsearch.xpack.entsearch.EnterpriseSearchRestIT/test%20%7Bp0=entsearch%2F55_search_application_search%2FQuery%20Search%20Application%20-%20not%20found%7D

**Reproduction line:**
```
./gradlew ':x-pack:plugin:ent-search:qa:rest:yamlRestTest' --tests "org.elasticsearch.xpack.entsearch.EnterpriseSearchRestIT.test {p0=entsearch/55_search_application_search/Query Search Application - not found}" -Dtests.seed=EB10645EFD85F20B -Dtests.locale=zh-CN -Dtests.timezone=NZ-CHAT -Druntime.java=20
```

**Applicable branches:**
main

**Reproduces locally?:**
Yes

**Failure history:**
https://gradle-enterprise.elastic.co/scans/tests?tests.container=org.elasticsearch.xpack.entsearch.EnterpriseSearchRestIT&tests.test=test%20%7Bp0%3Dentsearch/55_search_application_search/Query%20Search%20Application%20-%20not%20found%7D

**Failure excerpt:**
```
java.lang.AssertionError: Failure at [entsearch/55_search_application_search:128]: expected [404] status code but api [search_application.search] returned [400 Bad Request] [{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"request [/_application/search_application/nonexisting-test-search-application/_search] contains unrecognized parameters: [source], [source_content_type]","stack_trace":"org.elasticsearch.ElasticsearchException$1: request [/_application/search_application/nonexisting-test-search-application/_search] contains unrecognized parameters: [source], [source_content_type]\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.ElasticsearchException.guessRootCauses(ElasticsearchException.java:669)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.ElasticsearchException.generateFailureXContent(ElasticsearchException.java:597)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.rest.RestResponse.build(RestResponse.java:176)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.rest.RestResponse.<init>(RestResponse.java:124)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.rest.RestResponse.<init>(RestResponse.java:103)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.rest.SecurityRestFilter.handleException(SecurityRestFilter.java:109)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.rest.SecurityRestFilter.lambda$handleRequest$1(SecurityRestFilter.java:91)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.action.ActionListenerImplementations.safeAcceptException(ActionListenerImplementations.java:59)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.action.ActionListener$2.onFailure(ActionListener.java:166)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:160)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.support.SecondaryAuthenticator.lambda$authenticateAndAttachToContext$3(SecondaryAuthenticator.java:103)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:158)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.support.SecondaryAuthenticator.authenticate(SecondaryAuthenticator.java:113)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.support.SecondaryAuthenticator.authenticateAndAttachToContext(SecondaryAuthenticator.java:90)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.rest.SecurityRestFilter.lambda$handleRequest$2(SecurityRestFilter.java:86)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:158)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.action.ActionListenerImplementations$MappedActionListener.onResponse(ActionListenerImplementations.java:93)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.action.ActionListenerImplementations$RunBeforeActionListener.onResponse(ActionListenerImplementations.java:210)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.action.ActionListener$5.onResponse(ActionListener.java:333)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.AuthenticatorChain.writeAuthToContext(AuthenticatorChain.java:346)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.AuthenticatorChain.finishAuthentication(AuthenticatorChain.java:325)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.AuthenticatorChain.maybeLookupRunAsUser(AuthenticatorChain.java:202)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.AuthenticatorChain.lambda$doAuthenticate$1(AuthenticatorChain.java:121)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:158)\n\tat org.elasticsearch.xcore@8.8.0-SNAPSHOT/org.elasticsearch.xpack.core.common.IteratingActionListener.onResponse(IteratingActionListener.java:141)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.AuthenticatorChain.lambda$getAuthenticatorConsumer$4(AuthenticatorChain.java:188)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:158)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.RealmsAuthenticator.lambda$consumeToken$5(RealmsAuthenticator.java:220)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:158)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.action.support.ContextPreservingActionListener.onResponse(ContextPreservingActionListener.java:32)\n\tat org.elasticsearch.xcore@8.8.0-SNAPSHOT/org.elasticsearch.xpack.core.common.IteratingActionListener.onResponse(IteratingActionListener.java:141)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.RealmsAuthenticator.lambda$consumeToken$1(RealmsAuthenticator.java:163)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:158)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.support.CachingUsernamePasswordRealm.lambda$authenticateWithCache$1(CachingUsernamePasswordRealm.java:155)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:158)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.support.CachingUsernamePasswordRealm.handleCachedAuthentication(CachingUsernamePasswordRealm.java:242)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.support.CachingUsernamePasswordRealm.lambda$authenticateWithCache$2(CachingUsernamePasswordRealm.java:139)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:158)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.action.support.SubscribableListener$SuccessResult.complete(SubscribableListener.java:267)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.action.support.SubscribableListener.tryComplete(SubscribableListener.java:187)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.action.support.SubscribableListener.addListener(SubscribableListener.java:90)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.support.CachingUsernamePasswordRealm.authenticateWithCache(CachingUsernamePasswordRealm.java:134)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.support.CachingUsernamePasswordRealm.authenticate(CachingUsernamePasswordRealm.java:105)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.RealmsAuthenticator.lambda$consumeToken$4(RealmsAuthenticator.java:147)\n\tat org.elasticsearch.xcore@8.8.0-SNAPSHOT/org.elasticsearch.xpack.core.common.IteratingActionListener.run(IteratingActionListener.java:117)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.RealmsAuthenticator.consumeToken(RealmsAuthenticator.java:237)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.RealmsAuthenticator.authenticate(RealmsAuthenticator.java:83)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.AuthenticatorChain.lambda$getAuthenticatorConsumer$5(AuthenticatorChain.java:180)\n\tat org.elasticsearch.xcore@8.8.0-SNAPSHOT/org.elasticsearch.xpack.core.common.IteratingActionListener.onResponse(IteratingActionListener.java:135)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.AuthenticatorChain.lambda$getAuthenticatorConsumer$5(AuthenticatorChain.java:158)\n\tat org.elasticsearch.xcore@8.8.0-SNAPSHOT/org.elasticsearch.xpack.core.common.IteratingActionListener.onResponse(IteratingActionListener.java:135)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.AuthenticatorChain.lambda$getAuthenticatorConsumer$5(AuthenticatorChain.java:158)\n\tat org.elasticsearch.xcore@8.8.0-SNAPSHOT/org.elasticsearch.xpack.core.common.IteratingActionListener.onResponse(IteratingActionListener.java:135)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.AuthenticatorChain.lambda$getAuthenticatorConsumer$5(AuthenticatorChain.java:158)\n\tat org.elasticsearch.xcore@8.8.0-SNAPSHOT/org.elasticsearch.xpack.core.common.IteratingActionListener.run(IteratingActionListener.java:117)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.AuthenticatorChain.doAuthenticate(AuthenticatorChain.java:136)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.AuthenticatorChain.authenticateAsync(AuthenticatorChain.java:95)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.AuthenticationService.authenticate(AuthenticationService.java:257)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.AuthenticationService.authenticate(AuthenticationService.java:146)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.AuthenticationService.authenticate(AuthenticationService.java:124)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.rest.SecurityRestFilter.handleRequest(SecurityRestFilter.java:79)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.rest.RestController.dispatchRequest(RestController.java:410)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.rest.RestController.tryAllHandlers(RestController.java:539)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.rest.RestController.dispatchRequest(RestController.java:311)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.http.AbstractHttpServerTransport.dispatchRequest(AbstractHttpServerTransport.java:381)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.http.AbstractHttpServerTransport.handleIncomingRequest(AbstractHttpServerTransport.java:477)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.http.AbstractHttpServerTransport.incomingRequest(AbstractHttpServerTransport.java:354)\n\tat org.elasticsearch.transport.netty4@8.8.0-SNAPSHOT/org.elasticsearch.http.netty4.Netty4HttpPipeliningHandler.handlePipelinedRequest(Netty4HttpPipeliningHandler.java:128)\n\tat org.elasticsearch.transport.netty4@8.8.0-SNAPSHOT/org.elasticsearch.http.netty4.Netty4HttpPipeliningHandler.channelRead(Netty4HttpPipeliningHandler.java:118)\n\tat io.netty.transport@4.1.89.Final/io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)\n\tat io.netty.transport@4.1.89.Final/io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)\n\tat io.netty.transport@4.1.89.Final/io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)\n\tat io.netty.codec@4.1.89.Final/io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)\n\tat io.netty.codec@4.1.89.Final/io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111)\n\tat io.netty.transport@4.1.89.Final/io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)\n\tat io.netty.transport@4.1.89.Final/io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)\n\tat io.netty.transport@4.1.89.Final/io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)\n\tat io.netty.codec@4.1.89.Final/io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)\n\tat io.netty.transport@4.1.89.Final/io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)\n\tat io.netty.transport@4.1.89.Final/io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)\n\tat io.netty.transport@4.1.89.Final/io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)\n\tat io.netty.codec@4.1.89.Final/io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)\n\tat io.netty.transport@4.1.89.Final/io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)\n\tat io.netty.transport@4.1.89.Final/io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)\n\tat io.netty.transport@4.1.89.Final/io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)\n\tat org.elasticsearch.transport.netty4@8.8.0-SNAPSHOT/org.elasticsearch.http.netty4.Netty4HttpHeaderValidator.forwardData(Netty4HttpHeaderValidator.java:190)\n\tat org.elasticsearch.transport.netty4@8.8.0-SNAPSHOT/org.elasticsearch.http.netty4.Netty4HttpHeaderValidator.forwardFullRequest(Netty4HttpHeaderValidator.java:134)\n\tat org.elasticsearch.transport.netty4@8.8.0-SNAPSHOT/org.elasticsearch.http.netty4.Netty4HttpHeaderValidator$1.lambda$onResponse$0(Netty4HttpHeaderValidator.java:117)\n\tat io.netty.common@4.1.89.Final/io.netty.util.concurrent.PromiseTask.runTask(PromiseTask.java:98)\n\tat io.netty.common@4.1.89.Final/io.netty.util.concurrent.PromiseTask.run(PromiseTask.java:106)\n\tat io.netty.common@4.1.89.Final/io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174)\n\tat io.netty.common@4.1.89.Final/io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167)\n\tat io.netty.common@4.1.89.Final/io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)\n\tat io.netty.transport@4.1.89.Final/io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:566)\n\tat io.netty.common@4.1.89.Final/io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)\n\tat io.netty.common@4.1.89.Final/io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)\n\tat java.base/java.lang.Thread.run(Thread.java:1623)\nCaused by: java.lang.IllegalArgumentException: request [/_application/search_application/nonexisting-test-search-application/_search] contains unrecognized parameters: [source], [source_content_type]\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.rest.BaseRestHandler.handleRequest(BaseRestHandler.java:94)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.rest.SecurityRestFilter.doHandleRequest(SecurityRestFilter.java:98)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.rest.SecurityRestFilter.lambda$handleRequest$0(SecurityRestFilter.java:90)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:158)\n\t... 87 more\n"}],"type":"illegal_argument_exception","reason":"request [/_application/search_application/nonexisting-test-search-application/_search] contains unrecognized parameters: [source], [source_content_type]","stack_trace":"java.lang.IllegalArgumentException: request [/_application/search_application/nonexisting-test-search-application/_search] contains unrecognized parameters: [source], [source_content_type]\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.rest.BaseRestHandler.handleRequest(BaseRestHandler.java:94)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.rest.SecurityRestFilter.doHandleRequest(SecurityRestFilter.java:98)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.rest.SecurityRestFilter.lambda$handleRequest$0(SecurityRestFilter.java:90)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:158)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.support.SecondaryAuthenticator.lambda$authenticateAndAttachToContext$3(SecondaryAuthenticator.java:103)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:158)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.support.SecondaryAuthenticator.authenticate(SecondaryAuthenticator.java:113)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.support.SecondaryAuthenticator.authenticateAndAttachToContext(SecondaryAuthenticator.java:90)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.rest.SecurityRestFilter.lambda$handleRequest$2(SecurityRestFilter.java:86)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:158)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.action.ActionListenerImplementations$MappedActionListener.onResponse(ActionListenerImplementations.java:93)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.action.ActionListenerImplementations$RunBeforeActionListener.onResponse(ActionListenerImplementations.java:210)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.action.ActionListener$5.onResponse(ActionListener.java:333)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.AuthenticatorChain.writeAuthToContext(AuthenticatorChain.java:346)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.AuthenticatorChain.finishAuthentication(AuthenticatorChain.java:325)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.AuthenticatorChain.maybeLookupRunAsUser(AuthenticatorChain.java:202)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.AuthenticatorChain.lambda$doAuthenticate$1(AuthenticatorChain.java:121)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:158)\n\tat org.elasticsearch.xcore@8.8.0-SNAPSHOT/org.elasticsearch.xpack.core.common.IteratingActionListener.onResponse(IteratingActionListener.java:141)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.AuthenticatorChain.lambda$getAuthenticatorConsumer$4(AuthenticatorChain.java:188)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:158)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.RealmsAuthenticator.lambda$consumeToken$5(RealmsAuthenticator.java:220)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:158)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.action.support.ContextPreservingActionListener.onResponse(ContextPreservingActionListener.java:32)\n\tat org.elasticsearch.xcore@8.8.0-SNAPSHOT/org.elasticsearch.xpack.core.common.IteratingActionListener.onResponse(IteratingActionListener.java:141)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.RealmsAuthenticator.lambda$consumeToken$1(RealmsAuthenticator.java:163)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:158)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.support.CachingUsernamePasswordRealm.lambda$authenticateWithCache$1(CachingUsernamePasswordRealm.java:155)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:158)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.support.CachingUsernamePasswordRealm.handleCachedAuthentication(CachingUsernamePasswordRealm.java:242)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.support.CachingUsernamePasswordRealm.lambda$authenticateWithCache$2(CachingUsernamePasswordRealm.java:139)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:158)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.action.support.SubscribableListener$SuccessResult.complete(SubscribableListener.java:267)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.action.support.SubscribableListener.tryComplete(SubscribableListener.java:187)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.action.support.SubscribableListener.addListener(SubscribableListener.java:90)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.support.CachingUsernamePasswordRealm.authenticateWithCache(CachingUsernamePasswordRealm.java:134)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.support.CachingUsernamePasswordRealm.authenticate(CachingUsernamePasswordRealm.java:105)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.RealmsAuthenticator.lambda$consumeToken$4(RealmsAuthenticator.java:147)\n\tat org.elasticsearch.xcore@8.8.0-SNAPSHOT/org.elasticsearch.xpack.core.common.IteratingActionListener.run(IteratingActionListener.java:117)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.RealmsAuthenticator.consumeToken(RealmsAuthenticator.java:237)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.RealmsAuthenticator.authenticate(RealmsAuthenticator.java:83)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.AuthenticatorChain.lambda$getAuthenticatorConsumer$5(AuthenticatorChain.java:180)\n\tat org.elasticsearch.xcore@8.8.0-SNAPSHOT/org.elasticsearch.xpack.core.common.IteratingActionListener.onResponse(IteratingActionListener.java:135)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.AuthenticatorChain.lambda$getAuthenticatorConsumer$5(AuthenticatorChain.java:158)\n\tat org.elasticsearch.xcore@8.8.0-SNAPSHOT/org.elasticsearch.xpack.core.common.IteratingActionListener.onResponse(IteratingActionListener.java:135)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.AuthenticatorChain.lambda$getAuthenticatorConsumer$5(AuthenticatorChain.java:158)\n\tat org.elasticsearch.xcore@8.8.0-SNAPSHOT/org.elasticsearch.xpack.core.common.IteratingActionListener.onResponse(IteratingActionListener.java:135)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.AuthenticatorChain.lambda$getAuthenticatorConsumer$5(AuthenticatorChain.java:158)\n\tat org.elasticsearch.xcore@8.8.0-SNAPSHOT/org.elasticsearch.xpack.core.common.IteratingActionListener.run(IteratingActionListener.java:117)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.AuthenticatorChain.doAuthenticate(AuthenticatorChain.java:136)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.AuthenticatorChain.authenticateAsync(AuthenticatorChain.java:95)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.AuthenticationService.authenticate(AuthenticationService.java:257)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.AuthenticationService.authenticate(AuthenticationService.java:146)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.AuthenticationService.authenticate(AuthenticationService.java:124)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.rest.SecurityRestFilter.handleRequest(SecurityRestFilter.java:79)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.rest.RestController.dispatchRequest(RestController.java:410)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.rest.RestController.tryAllHandlers(RestController.java:539)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.rest.RestController.dispatchRequest(RestController.java:311)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.http.AbstractHttpServerTransport.dispatchRequest(AbstractHttpServerTransport.java:381)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.http.AbstractHttpServerTransport.handleIncomingRequest(AbstractHttpServerTransport.java:477)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.http.AbstractHttpServerTransport.incomingRequest(AbstractHttpServerTransport.java:354)\n\tat org.elasticsearch.transport.netty4@8.8.0-SNAPSHOT/org.elasticsearch.http.netty4.Netty4HttpPipeliningHandler.handlePipelinedRequest(Netty4HttpPipeliningHandler.java:128)\n\tat org.elasticsearch.transport.netty4@8.8.0-SNAPSHOT/org.elasticsearch.http.netty4.Netty4HttpPipeliningHandler.channelRead(Netty4HttpPipeliningHandler.java:118)\n\tat io.netty.transport@4.1.89.Final/io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)\n\tat io.netty.transport@4.1.89.Final/io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)\n\tat io.netty.transport@4.1.89.Final/io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)\n\tat io.netty.codec@4.1.89.Final/io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)\n\tat io.netty.codec@4.1.89.Final/io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111)\n\tat io.netty.transport@4.1.89.Final/io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)\n\tat io.netty.transport@4.1.89.Final/io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)\n\tat io.netty.transport@4.1.89.Final/io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)\n\tat io.netty.codec@4.1.89.Final/io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)\n\tat io.netty.transport@4.1.89.Final/io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)\n\tat io.netty.transport@4.1.89.Final/io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)\n\tat io.netty.transport@4.1.89.Final/io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)\n\tat io.netty.codec@4.1.89.Final/io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)\n\tat io.netty.transport@4.1.89.Final/io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)\n\tat io.netty.transport@4.1.89.Final/io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)\n\tat io.netty.transport@4.1.89.Final/io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)\n\tat org.elasticsearch.transport.netty4@8.8.0-SNAPSHOT/org.elasticsearch.http.netty4.Netty4HttpHeaderValidator.forwardData(Netty4HttpHeaderValidator.java:190)\n\tat org.elasticsearch.transport.netty4@8.8.0-SNAPSHOT/org.elasticsearch.http.netty4.Netty4HttpHeaderValidator.forwardFullRequest(Netty4HttpHeaderValidator.java:134)\n\tat org.elasticsearch.transport.netty4@8.8.0-SNAPSHOT/org.elasticsearch.http.netty4.Netty4HttpHeaderValidator$1.lambda$onResponse$0(Netty4HttpHeaderValidator.java:117)\n\tat io.netty.common@4.1.89.Final/io.netty.util.concurrent.PromiseTask.runTask(PromiseTask.java:98)\n\tat io.netty.common@4.1.89.Final/io.netty.util.concurrent.PromiseTask.run(PromiseTask.java:106)\n\tat io.netty.common@4.1.89.Final/io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174)\n\tat io.netty.common@4.1.89.Final/io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167)\n\tat io.netty.common@4.1.89.Final/io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)\n\tat io.netty.transport@4.1.89.Final/io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:566)\n\tat io.netty.common@4.1.89.Final/io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)\n\tat io.netty.common@4.1.89.Final/io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)\n\tat java.base/java.lang.Thread.run(Thread.java:1623)\n"},"status":400}]
Expected: <404>
     but: was <400>

  at __randomizedtesting.SeedInfo.seed([EB10645EFD85F20B:63445B8453799FF3]:0)
  at org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase.executeSection(ESClientYamlSuiteTestCase.java:572)
  at org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase.test(ESClientYamlSuiteTestCase.java:524)
  at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
  at java.lang.reflect.Method.invoke(Method.java:578)
  at com.carrotsearch.randomizedtesting.RandomizedRunner.invoke(RandomizedRunner.java:1758)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$8.evaluate(RandomizedRunner.java:946)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$9.evaluate(RandomizedRunner.java:982)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$10.evaluate(RandomizedRunner.java:996)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at org.apache.lucene.tests.util.TestRuleSetupTeardownChained$1.evaluate(TestRuleSetupTeardownChained.java:48)
  at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
  at org.apache.lucene.tests.util.TestRuleThreadAndTestName$1.evaluate(TestRuleThreadAndTestName.java:45)
  at org.apache.lucene.tests.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:60)
  at org.apache.lucene.tests.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:44)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:390)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl.forkTimeoutingTask(ThreadLeakControl.java:843)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl$3.evaluate(ThreadLeakControl.java:490)
  at com.carrotsearch.randomizedtesting.RandomizedRunner.runSingleTest(RandomizedRunner.java:955)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$5.evaluate(RandomizedRunner.java:840)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$6.evaluate(RandomizedRunner.java:891)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$7.evaluate(RandomizedRunner.java:902)
  at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at org.apache.lucene.tests.util.TestRuleStoreClassName$1.evaluate(TestRuleStoreClassName.java:38)
  at com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
  at com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at org.apache.lucene.tests.util.TestRuleAssertionsRequired$1.evaluate(TestRuleAssertionsRequired.java:53)
  at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
  at org.apache.lucene.tests.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:44)
  at org.apache.lucene.tests.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:60)
  at org.apache.lucene.tests.util.TestRuleIgnoreTestSuites$1.evaluate(TestRuleIgnoreTestSuites.java:47)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:390)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl.lambda$forkTimeoutingTask$0(ThreadLeakControl.java:850)
  at java.lang.Thread.run(Thread.java:1623)

  Caused by: java.lang.AssertionError: expected [404] status code but api [search_application.search] returned [400 Bad Request] [{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"request [/_application/search_application/nonexisting-test-search-application/_search] contains unrecognized parameters: [source], [source_content_type]","stack_trace":"org.elasticsearch.ElasticsearchException$1: request [/_application/search_application/nonexisting-test-search-application/_search] contains unrecognized parameters: [source], [source_content_type]\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.ElasticsearchException.guessRootCauses(ElasticsearchException.java:669)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.ElasticsearchException.generateFailureXContent(ElasticsearchException.java:597)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.rest.RestResponse.build(RestResponse.java:176)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.rest.RestResponse.<init>(RestResponse.java:124)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.rest.RestResponse.<init>(RestResponse.java:103)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.rest.SecurityRestFilter.handleException(SecurityRestFilter.java:109)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.rest.SecurityRestFilter.lambda$handleRequest$1(SecurityRestFilter.java:91)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.action.ActionListenerImplementations.safeAcceptException(ActionListenerImplementations.java:59)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.action.ActionListener$2.onFailure(ActionListener.java:166)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:160)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.support.SecondaryAuthenticator.lambda$authenticateAndAttachToContext$3(SecondaryAuthenticator.java:103)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:158)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.support.SecondaryAuthenticator.authenticate(SecondaryAuthenticator.java:113)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.support.SecondaryAuthenticator.authenticateAndAttachToContext(SecondaryAuthenticator.java:90)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.rest.SecurityRestFilter.lambda$handleRequest$2(SecurityRestFilter.java:86)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:158)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.action.ActionListenerImplementations$MappedActionListener.onResponse(ActionListenerImplementations.java:93)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.action.ActionListenerImplementations$RunBeforeActionListener.onResponse(ActionListenerImplementations.java:210)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.action.ActionListener$5.onResponse(ActionListener.java:333)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.AuthenticatorChain.writeAuthToContext(AuthenticatorChain.java:346)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.AuthenticatorChain.finishAuthentication(AuthenticatorChain.java:325)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.AuthenticatorChain.maybeLookupRunAsUser(AuthenticatorChain.java:202)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.AuthenticatorChain.lambda$doAuthenticate$1(AuthenticatorChain.java:121)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:158)\n\tat org.elasticsearch.xcore@8.8.0-SNAPSHOT/org.elasticsearch.xpack.core.common.IteratingActionListener.onResponse(IteratingActionListener.java:141)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.AuthenticatorChain.lambda$getAuthenticatorConsumer$4(AuthenticatorChain.java:188)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:158)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.RealmsAuthenticator.lambda$consumeToken$5(RealmsAuthenticator.java:220)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:158)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.action.support.ContextPreservingActionListener.onResponse(ContextPreservingActionListener.java:32)\n\tat org.elasticsearch.xcore@8.8.0-SNAPSHOT/org.elasticsearch.xpack.core.common.IteratingActionListener.onResponse(IteratingActionListener.java:141)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.RealmsAuthenticator.lambda$consumeToken$1(RealmsAuthenticator.java:163)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:158)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.support.CachingUsernamePasswordRealm.lambda$authenticateWithCache$1(CachingUsernamePasswordRealm.java:155)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:158)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.support.CachingUsernamePasswordRealm.handleCachedAuthentication(CachingUsernamePasswordRealm.java:242)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.support.CachingUsernamePasswordRealm.lambda$authenticateWithCache$2(CachingUsernamePasswordRealm.java:139)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:158)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.action.support.SubscribableListener$SuccessResult.complete(SubscribableListener.java:267)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.action.support.SubscribableListener.tryComplete(SubscribableListener.java:187)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.action.support.SubscribableListener.addListener(SubscribableListener.java:90)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.support.CachingUsernamePasswordRealm.authenticateWithCache(CachingUsernamePasswordRealm.java:134)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.support.CachingUsernamePasswordRealm.authenticate(CachingUsernamePasswordRealm.java:105)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.RealmsAuthenticator.lambda$consumeToken$4(RealmsAuthenticator.java:147)\n\tat org.elasticsearch.xcore@8.8.0-SNAPSHOT/org.elasticsearch.xpack.core.common.IteratingActionListener.run(IteratingActionListener.java:117)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.RealmsAuthenticator.consumeToken(RealmsAuthenticator.java:237)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.RealmsAuthenticator.authenticate(RealmsAuthenticator.java:83)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.AuthenticatorChain.lambda$getAuthenticatorConsumer$5(AuthenticatorChain.java:180)\n\tat org.elasticsearch.xcore@8.8.0-SNAPSHOT/org.elasticsearch.xpack.core.common.IteratingActionListener.onResponse(IteratingActionListener.java:135)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.AuthenticatorChain.lambda$getAuthenticatorConsumer$5(AuthenticatorChain.java:158)\n\tat org.elasticsearch.xcore@8.8.0-SNAPSHOT/org.elasticsearch.xpack.core.common.IteratingActionListener.onResponse(IteratingActionListener.java:135)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.AuthenticatorChain.lambda$getAuthenticatorConsumer$5(AuthenticatorChain.java:158)\n\tat org.elasticsearch.xcore@8.8.0-SNAPSHOT/org.elasticsearch.xpack.core.common.IteratingActionListener.onResponse(IteratingActionListener.java:135)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.AuthenticatorChain.lambda$getAuthenticatorConsumer$5(AuthenticatorChain.java:158)\n\tat org.elasticsearch.xcore@8.8.0-SNAPSHOT/org.elasticsearch.xpack.core.common.IteratingActionListener.run(IteratingActionListener.java:117)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.AuthenticatorChain.doAuthenticate(AuthenticatorChain.java:136)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.AuthenticatorChain.authenticateAsync(AuthenticatorChain.java:95)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.AuthenticationService.authenticate(AuthenticationService.java:257)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.AuthenticationService.authenticate(AuthenticationService.java:146)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.AuthenticationService.authenticate(AuthenticationService.java:124)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.rest.SecurityRestFilter.handleRequest(SecurityRestFilter.java:79)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.rest.RestController.dispatchRequest(RestController.java:410)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.rest.RestController.tryAllHandlers(RestController.java:539)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.rest.RestController.dispatchRequest(RestController.java:311)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.http.AbstractHttpServerTransport.dispatchRequest(AbstractHttpServerTransport.java:381)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.http.AbstractHttpServerTransport.handleIncomingRequest(AbstractHttpServerTransport.java:477)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.http.AbstractHttpServerTransport.incomingRequest(AbstractHttpServerTransport.java:354)\n\tat org.elasticsearch.transport.netty4@8.8.0-SNAPSHOT/org.elasticsearch.http.netty4.Netty4HttpPipeliningHandler.handlePipelinedRequest(Netty4HttpPipeliningHandler.java:128)\n\tat org.elasticsearch.transport.netty4@8.8.0-SNAPSHOT/org.elasticsearch.http.netty4.Netty4HttpPipeliningHandler.channelRead(Netty4HttpPipeliningHandler.java:118)\n\tat io.netty.transport@4.1.89.Final/io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)\n\tat io.netty.transport@4.1.89.Final/io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)\n\tat io.netty.transport@4.1.89.Final/io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)\n\tat io.netty.codec@4.1.89.Final/io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)\n\tat io.netty.codec@4.1.89.Final/io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111)\n\tat io.netty.transport@4.1.89.Final/io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)\n\tat io.netty.transport@4.1.89.Final/io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)\n\tat io.netty.transport@4.1.89.Final/io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)\n\tat io.netty.codec@4.1.89.Final/io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)\n\tat io.netty.transport@4.1.89.Final/io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)\n\tat io.netty.transport@4.1.89.Final/io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)\n\tat io.netty.transport@4.1.89.Final/io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)\n\tat io.netty.codec@4.1.89.Final/io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)\n\tat io.netty.transport@4.1.89.Final/io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)\n\tat io.netty.transport@4.1.89.Final/io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)\n\tat io.netty.transport@4.1.89.Final/io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)\n\tat org.elasticsearch.transport.netty4@8.8.0-SNAPSHOT/org.elasticsearch.http.netty4.Netty4HttpHeaderValidator.forwardData(Netty4HttpHeaderValidator.java:190)\n\tat org.elasticsearch.transport.netty4@8.8.0-SNAPSHOT/org.elasticsearch.http.netty4.Netty4HttpHeaderValidator.forwardFullRequest(Netty4HttpHeaderValidator.java:134)\n\tat org.elasticsearch.transport.netty4@8.8.0-SNAPSHOT/org.elasticsearch.http.netty4.Netty4HttpHeaderValidator$1.lambda$onResponse$0(Netty4HttpHeaderValidator.java:117)\n\tat io.netty.common@4.1.89.Final/io.netty.util.concurrent.PromiseTask.runTask(PromiseTask.java:98)\n\tat io.netty.common@4.1.89.Final/io.netty.util.concurrent.PromiseTask.run(PromiseTask.java:106)\n\tat io.netty.common@4.1.89.Final/io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174)\n\tat io.netty.common@4.1.89.Final/io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167)\n\tat io.netty.common@4.1.89.Final/io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)\n\tat io.netty.transport@4.1.89.Final/io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:566)\n\tat io.netty.common@4.1.89.Final/io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)\n\tat io.netty.common@4.1.89.Final/io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)\n\tat java.base/java.lang.Thread.run(Thread.java:1623)\nCaused by: java.lang.IllegalArgumentException: request [/_application/search_application/nonexisting-test-search-application/_search] contains unrecognized parameters: [source], [source_content_type]\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.rest.BaseRestHandler.handleRequest(BaseRestHandler.java:94)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.rest.SecurityRestFilter.doHandleRequest(SecurityRestFilter.java:98)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.rest.SecurityRestFilter.lambda$handleRequest$0(SecurityRestFilter.java:90)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:158)\n\t... 87 more\n"}],"type":"illegal_argument_exception","reason":"request [/_application/search_application/nonexisting-test-search-application/_search] contains unrecognized parameters: [source], [source_content_type]","stack_trace":"java.lang.IllegalArgumentException: request [/_application/search_application/nonexisting-test-search-application/_search] contains unrecognized parameters: [source], [source_content_type]\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.rest.BaseRestHandler.handleRequest(BaseRestHandler.java:94)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.rest.SecurityRestFilter.doHandleRequest(SecurityRestFilter.java:98)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.rest.SecurityRestFilter.lambda$handleRequest$0(SecurityRestFilter.java:90)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:158)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.support.SecondaryAuthenticator.lambda$authenticateAndAttachToContext$3(SecondaryAuthenticator.java:103)\n\tat org.elasticsearch.server@8.8.0-SNAPSHOT/org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:158)\n\tat org.elasticsearch.security@8.8.0-SNAPSHOT/org.elasticsearch.xpack.security.authc.support.SecondaryAuthenticator.authenticate(SecondaryAuthenticator.java:113)\n\tat org.elasticsearch.security@8.8....
```
x-pack/plugin/ent-search/src/main/java/org/elasticsearch/xpack/application/search/action/RestQuerySearchApplicationAction.java
public class RestQuerySearchApplicationAction extends BaseRestHandler {
    public static final String ENDPOINT_PATH = "/" + EnterpriseSearch.SEARCH_APPLICATION_API_ENDPOINT + "/{name}" + "/_search";
    @Override
    public String getName() {
        return "search_application_query_action";
    }
    @Override
    public List<Route> routes() {
        return List.of(new Route(GET, ENDPOINT_PATH), new Route(POST, ENDPOINT_PATH));
    }
    @Override
    protected RestChannelConsumer prepareRequest(RestRequest restRequest, NodeClient client) throws IOException {
        final String searchAppName = restRequest.param("name");
        SearchApplicationSearchRequest request;
        if (restRequest.hasContent()) {
            request = SearchApplicationSearchRequest.fromXContent(searchAppName, restRequest.contentParser());
        } else {
            request = new SearchApplicationSearchRequest(searchAppName);
        }
        final SearchApplicationSearchRequest finalRequest = request;
        return channel -> client.execute(QuerySearchApplicationAction.INSTANCE, finalRequest, new RestToXContentListener<>(channel));
    }
}