freescout icon indicating copy to clipboard operation
freescout copied to clipboard

Telegram Module error for incoming messages

Open ilyakonovalenko opened this issue 1 year ago • 4 comments

We see the following errors in App Log.

Error retrieving user info: Bad Request: invalid user_id specified {"exception":"[object] (BotMan\\Drivers\\Telegram\\Exceptions\\TelegramException(code: 0): Error retrieving user info: Bad Request: invalid user_id specified at /var/www/XXX/data/www/XXX/Modules/TelegramIntegration/vendor/botman/driver-telegram/src/TelegramDriver.php:88)

It looks like some checks should be added to prevent API calls in order to stop such errors.

ilyakonovalenko avatar Aug 01 '22 16:08 ilyakonovalenko

We'll check it. Maybe Telegram made some changes in their API.

freescout-helpdesk avatar Aug 01 '22 17:08 freescout-helpdesk

    if ($response->getStatusCode() !== 200) {
        throw new TelegramException('Error retrieving user info: '.$responseData['description']);
    }

This is a regular error logging when Telegram receives invalid user_id. But we don't know how to reproduce the issue.

freescout-helpdesk avatar Aug 02 '22 05:08 freescout-helpdesk

This is a regular error logging when Telegram receives invalid user_id.

It looks like conversation won't be created anyway if no user_id is provided? If so, maybe just add a check for user_id to skip the rest part of the incomming message processing code?

ilyakonovalenko avatar Aug 02 '22 12:08 ilyakonovalenko

We need to find out why user_id may be empty.

freescout-helpdesk avatar Aug 02 '22 13:08 freescout-helpdesk

So far we were unable to reproduce the issue. Feel free to re-open the issue if you'll manage to find out why user_id is empty.

freescout-helpdesk avatar Aug 17 '22 06:08 freescout-helpdesk