def _handle_schedule_execution(
        self, liveaction_api, requester_user, context_string=None, show_secrets=False
    ):
        """
        :param liveaction: LiveActionAPI object.
        :type liveaction: :class:`LiveActionAPI`
        """
        if not requester_user:
            requester_user = UserDB(name=cfg.CONF.system_user.user)

        # Assert action ref is valid
        action_ref = liveaction_api.action
        action_db = action_utils.get_action_by_ref(action_ref)

        if not action_db:
            message = 'Action "%s" cannot be found.' % (action_ref)
            LOG.warning(message)
            abort(http_client.BAD_REQUEST, message)

        # Assert the permissions
        permission_type = PermissionType.ACTION_EXECUTE
        rbac_utils = get_rbac_backend().get_utils_class()
        rbac_utils.assert_user_has_resource_db_permission(
            user_db=requester_user,
            resource_db=action_db,
            permission_type=permission_type,
        )

        # Validate that the authenticated user is admin if user query param is provided
        user = liveaction_api.user or requester_user.name
        rbac_utils.assert_user_is_admin_if_user_query_param_is_provided(
            user_db=requester_user, user=user
        )

        try:
            return self._schedule_execution(
                liveaction=liveaction_api,
                requester_user=requester_user,
                user=user,
                context_string=context_string,
                show_secrets=show_secrets,
                action_db=action_db,
            )
        except ValueError as e:
            LOG.exception("Unable to execute action.")
            abort(http_client.BAD_REQUEST, six.text_type(e))
        except jsonschema.ValidationError as e:
            LOG.exception("Unable to execute action. Parameter validation failed.")
            abort(
                http_client.BAD_REQUEST,
                re.sub("u'([^']*)'", r"'\1'", getattr(e, "message", six.text_type(e))),
            )
        except trace_exc.TraceNotFoundException as e:
            abort(http_client.BAD_REQUEST, six.text_type(e))
        except validation_exc.ValueValidationException as e:
            raise e
        except Exception as e:
            LOG.exception("Unable to execute action. Unexpected error encountered.")
            abort(http_client.INTERNAL_SERVER_ERROR, six.text_type(e))

        :param liveaction: LiveActionAPI object.
        :type liveaction: :class:`LiveActionAPI`
        
st2api/st2api/controllers/v1/actionexecutions.py