Error propagation

The @HystrixCommand annotation has the ability to specify exceptions types that should be ignored:

    @HystrixCommand(ignoreExceptions = {BadRequestException.class}) 
    public Account findAccountById(String id) { 
        return accountService.findAccountById(id); 
    } 

If accountService.findAccountById(id) throws an exception of the BadRequestException type, then this exception will be wrapped in HystrixBadRequestException and be-thrown without triggering the fallback logic.

Let's create a REST controller for the customer service.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.225.254.192