code: @Override
      public ModelAndView resolveException(final HttpServletRequest request,
                                           final HttpServletResponse response, final Object handler,
                                           final Exception exception) {
  
  
          if (!(exception instanceof FlowExecutionRepositoryException) || exception instanceof BadlyFormattedFlowExecutionKeyException) {
              LOGGER.debug("Ignoring the received exception due to a type mismatch", exception);
              return null;
          }
  
          val urlToRedirectTo = request.getRequestURI()
              + (request.getQueryString() != null ? '?'
              + request.getQueryString() : StringUtils.EMPTY);
  
          LOGGER.debug("Error getting flow information for URL [{}]", urlToRedirectTo, exception);
          val model = new HashMap<String, Object>();
          model.put(this.modelKey, StringEscapeUtils.escapeHtml4(exception.getMessage()));
  
          return new ModelAndView(new RedirectView(urlToRedirectTo), model);
      }
docs: Since FlowExecutionRepositoryException is a common ancestor to these exceptions and other
  error cases we would likely want to hide from the user, it seems reasonable to check for
  FlowExecutionRepositoryException.
  <p>
  BadlyFormattedFlowExecutionKeyException is specifically ignored by this handler
  because redirecting to the requested URI with this exception may cause an infinite
  redirect loop (i.e. when invalid "execution" parameter exists as part of the query string