3

I'm a big fan of the Open Source project of Netflix. They made some really cool stuff.

I have set up a Zuul and that is working fine. Created all kind of filters and those are dynamically loaded and run.

What I now try to do is use Hystrix inside a filter. What I see is that if everything when fine it all works. But when there is a exception inside the run() method Zuul is catching it instead of Hystrix. So the getFallback() is never called.

I shared my code Github.

Somebody has any idea how Hystrix can catch the exception instead of Zuul?

Andrei Sfat
  • 8,440
  • 5
  • 49
  • 69
Peter Fortuin
  • 5,041
  • 8
  • 41
  • 69

1 Answers1

1

I think the issue is actually with how you are executing your hystrix command. Try calling execute() instead of run(). I suspect that what's happening is run() is simply throwing the exception whereas execute() will catch it and call getFallback().

Nick DeFazio
  • 2,412
  • 27
  • 31