try { result = action.execute(); flushCache(); } catch (CommandActionExecutionException throwable) { Throwable cause = throwable.getCause(); if (isIgnorable(cause)) { throw new HystrixBadRequestException(cause.getMessage(), cause);
@Override @SuppressWarnings("unchecked") protected List<Object> getFallback() { if (getFallbackAction() != null) { final CommandAction commandAction = getFallbackAction(); try { return (List<Object>) process(new Action() { @Override Object execute() { MetaHolder metaHolder = commandAction.getMetaHolder(); Object[] args = toArgs(getCollapsedRequests()); args = createArgsForFallback(args, metaHolder, getExecutionException()); return commandAction.executeWithArgs(commandAction.getMetaHolder().getFallbackExecutionType(), args); } }); } catch (Throwable e) { LOGGER.error(FallbackErrorMessageBuilder.create() .append(commandAction, e).build()); throw new FallbackInvocationException(unwrapCause(e)); } } else { return super.getFallback(); } }
/** * {@inheritDoc}. */ @Override protected T getFallback() { throw new RuntimeException("No fallback available.", getExecutionException()); }
try { result = action.execute(); flushCache(); } catch (CommandActionExecutionException throwable) { Throwable cause = throwable.getCause(); if (isIgnorable(cause)) { throw new HystrixBadRequestException(cause.getMessage(), cause);
return super.getFallback();
return super.getFallback();
@Override @SuppressWarnings("unchecked") protected List<Object> getFallback() { if (getFallbackAction() != null) { final CommandAction commandAction = getFallbackAction(); try { return (List<Object>) process(new Action() { @Override Object execute() { MetaHolder metaHolder = commandAction.getMetaHolder(); Object[] args = toArgs(getCollapsedRequests()); args = createArgsForFallback(args, metaHolder, getExecutionException()); return commandAction.executeWithArgs(commandAction.getMetaHolder().getFallbackExecutionType(), args); } }); } catch (Throwable e) { LOGGER.error(FallbackErrorMessageBuilder.create() .append(commandAction, e).build()); throw new FallbackInvocationException(unwrapCause(e)); } } else { return super.getFallback(); } }