Rocket Chat App did't sent Http request

Hi, I try link my Action Button with Http request, but I have a wrong response.
Method “executeActionButtonHandler” work, but Http not work.

My code:

public async executeActionButtonHandler(
        context: UIKitActionButtonInteractionContext,
        read: IRead,
        http: IHttp,
        persistence: IPersistence,
        modify: IModify
    ): Promise<IUIKitResponse> {
        const {
            buttonContext,
            actionId,
            triggerId,
            user,
            room,
            message,
        } = context.getInteractionData();

        // If you have multiple action buttons, use `actionId` to determine
        // which one the user interacted with
        if (actionId === 'my-action-id') {
            const blockBuilder = modify.getCreator().getBlockBuilder();
            const response = await http.post('https://deep-sea.ru/rest/startIssue', {data: {id: '0'}});
            return context.getInteractionResponder().openModalViewResponse({
                title: blockBuilder.newPlainTextObject('Interaction received'),
                blocks: blockBuilder.addSectionBlock({
                    text: blockBuilder.newPlainTextObject('We received your interaction, thanks!')
                }).getBlocks(),
            });
        }

        return context.getInteractionResponder().successResponse();
    }
}

Hi,

Pleasw swe this and tell us more about your server setup and what you arr trying to achieve (see XY problem!)

Hi
I try to sand http request (https://deep-sea.ru/rest/startIssue) by meens of Action Button in App.
I try it make by meens of slash command and it works.

I think this code must made it.

public async executeActionButtonHandler(
        context: UIKitActionButtonInteractionContext,
        read: IRead,
        http: IHttp,
        persistence: IPersistence,
        modify: IModify
    ): Promise<IUIKitResponse> {
        const {
            buttonContext,
            actionId,
            triggerId,
            user,
            room,
            message,
        } = context.getInteractionData();

        // If you have multiple action buttons, use `actionId` to determine
        // which one the user interacted with
        if (actionId === 'my-action-id') {
            const blockBuilder = modify.getCreator().getBlockBuilder();
            const response = await http.post('https://deep-sea.ru/rest/startIssue', {data: {id: '0'}});
            return context.getInteractionResponder().openModalViewResponse({
                title: blockBuilder.newPlainTextObject('Interaction received'),
                blocks: blockBuilder.addSectionBlock({
                    text: blockBuilder.newPlainTextObject('We received your interaction, thanks!')
                }).getBlocks(),
            });
        }

        return context.getInteractionResponder().successResponse();
    }
}

Hmmm. I might need to ask someone about this.

Have you read:

And tried the demo app here?

Also

https://developer.rocket.chat//docs/action-buttons?highlight=action-buttons

Thanks for your time,

I try to use your DamoApp and add some rows, see screenshot.
What is the wrong? I don’t understand.

Log:

At a rough guess it is because statusCode is ‘undefined’

You need to check what it is set to.

eg

This error understand for me, this is because const response = await http.post('https://google.com); didn’t execute. As you understand http request to Google must be executed, 100%.

I tried to use this part of code const response = await http.post('https://google.com); when make App for slash command and it work perfectly.

I think we have some problem with method executeActionButtonHandler.