'Ethers.js pancakeswap swapExactTokensForTokens invalid response - sendTransaction

I'm trying to execute an Pancakeswap swapExactTokensForTokens using ethers.js but i just keep getting the error invalid response - sendTransaction. Unfortunatly the error doesnt contain any more usefull information then that :(

My code:

const provider = new ethers.providers.WebSocketProvider(config.network);
const tradeWallet = ethers.Wallet.fromMnemonic(config.mnemonic);
const account = tradeWallet.connect(provider);

const router = new ethers.Contract(
  '0x10ED43C718714eb63d5aA57B78B54704E256024E',
  [
    'function getAmountsOut(uint amountIn, address[] memory path) public view returns (uint[] memory amounts)',
    'function swapExactTokensForTokens(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts)'
  ],
  account 
);

[snip]

    var amountIn = ethers.utils.parseUnits('0.001', 'ether');
    var tokenIn = '0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c';
    var tokenOut = '0xd2de3fd31b5c9e1557cf329032615a2870a29ccd';
    var gasPrice = '5000000000';
    var gasLimit = '231795'
    
    var amounts = await router.getAmountsOut(amountIn, [tokenIn, tokenOut])
    const amountOutMin = amounts[1].sub(amounts[1].div(10));
// values at the time where:
// tokenIn: 100000000000000 0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c (WBNB)
// tokenOut: 1810636794711288351 0xd2de3fd31b5c9e1557cf329032615a2870a29ccd

    var tx =  router.swapExactTokensForTokens(
              amountIn,
              amountOutMin,
              [tokenIn, tokenOut],
              addresses.recipient,
              Date.now() + 1000 * 60 * 3, //10 minutes
              { gasPrice: gasPrice, 
                gasLimit: gasLimit
              }
            );
            const receipt = await tx.wait(); 


Solution 1:[1]

use 'swapExactTokensForETHSupportingFeeOnTransferTokens',Because your 'tokenOut' token has a tax function

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 ???