nodes: 0, module; 1, function_definition; 2, function_name:error_router; 3, parameters; 4, block; 5, identifier:self; 6, identifier:original_handler; 7, identifier:e; 8, expression_statement; 9, if_statement; 10, return_statement; 11, comment:"""This function decides whether the error occured in a flask-restful
          endpoint or not. If it happened in a flask-restful endpoint, our
          handler will be dispatched. If it happened in an unrelated view, the
          app's original error handler will be dispatched.
          In the event that the error occurred in a flask-restful endpoint but
          the local handler can't resolve the situation, the router will fall
          back onto the original_handler as last resort.
  
          :param original_handler: the original Flask error handler for the app
          :type original_handler: function
          :param e: the exception raised while handling the request
          :type e: Exception
  
          """; 12, call; 13, block; 14, call; 15, attribute; 16, argument_list; 17, try_statement; 18, identifier:original_handler; 19, argument_list; 20, identifier:self; 21, identifier:_has_fr_route; 22, block; 23, except_clause; 24, identifier:e; 25, return_statement; 26, identifier:Exception; 27, block; 28, call; 29, pass_statement; 30, comment:# Fall through to original handler; 31, attribute; 32, argument_list; 33, identifier:self; 34, identifier:handle_error; 35, identifier:e
code: def error_router(self, original_handler, e):
          """This function decides whether the error occured in a flask-restful
          endpoint or not. If it happened in a flask-restful endpoint, our
          handler will be dispatched. If it happened in an unrelated view, the
          app's original error handler will be dispatched.
          In the event that the error occurred in a flask-restful endpoint but
          the local handler can't resolve the situation, the router will fall
          back onto the original_handler as last resort.
  
          :param original_handler: the original Flask error handler for the app
          :type original_handler: function
          :param e: the exception raised while handling the request
          :type e: Exception
  
          """
          if self._has_fr_route():
              try:
                  return self.handle_error(e)
              except Exception:
                  pass  # Fall through to original handler
          return original_handler(e)