Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[gateway] NPE is raised in case of dynamic-routing and no endpoints available #2243

Closed
NicolasGeraud opened this issue May 15, 2019 · 0 comments

Comments

@NicolasGeraud
Copy link
Member

commented May 15, 2019

Expected Behavior

a 503 response is expected

Current Behavior

An error occurs in policy[dynamic-routing] error[io.gravitee.gateway.policy.PolicyChainException: io.gravitee.gateway.policy.PolicyException: java.lang.reflect.InvocationTargetException
at io.gravitee.gateway.policy.impl.RequestPolicyChain.execute(RequestPolicyChain.java:46)
at io.gravitee.gateway.policy.impl.PolicyChain.doNext(PolicyChain.java:74) 
...
...
aused by: java.lang.NullPointerException
at io.gravitee.gateway.core.endpoint.resolver.impl.TargetEndpointResolver.selectUserDefinedEndpoint(TargetEndpointResolver.java:114)
at io.gravitee.gateway.core.endpoint.resolver.impl.TargetEndpointResolver.resolve(TargetEndpointResolver.java:63)
at io.gravitee.gateway.core.invoker.EndpointInvoker.invoke(EndpointInvoker.java:59)
at io.gravitee.gateway.handlers.api.ApiReactorHandler.handleProxyInvocation(ApiReactorHandler.java:149)
at io.gravitee.gateway.handlers.api.ApiReactorHandler.lambda$handleClientRequest$0(ApiReactorHandler.java:133)
at io.gravitee.gateway.core.processor.ProviderProcessorChain.process(ProviderProcessorChain.java:85)
at io.gravitee.gateway.core.processor.ProviderProcessorChain.lambda$process$0(ProviderProcessorChain.java:69)
at io.gravitee.gateway.policy.impl.PolicyChain.doNext(PolicyChain.java:85)
at io.gravitee.gateway.policy.impl.StreamablePolicyChain.doNext(StreamablePolicyChain.java:55)
at io.gravitee.policy.dynamicrouting.DynamicRoutingPolicy.onRequest(DynamicRoutingPolicy.java:121)
... 96 more 

Steps to Reproduce (for bugs)

  1. use dynamic-routing policy and select an endpoint
  2. configure the healthcheck to fail
  3. call your api
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.