What’s going on here, is that by default, the bor nodes that process Polygon transactions will turn away transactions that use more than a certain amount of gas. The node is forked from go ethereum, where the default behavior is to turn away transactions that use more than 1 ether in gas (I’d assume this is 1 MATIC in your case).
There’s two things that might be happening here:
You’re sending way more gas than you need to be for the transaction. This can happen if you’ve hard coded in a gas value that exceeds this limit.
The transaction that you’re calling to is using more gas than the nodes by default are willing to accept.
In the stack exchange post you mentioned, one of the solutions is to change --rpc.txfeecap on the node side; this is here to make sure that public facing nodes don’t get spammed with transactions that use too much compute. That is a setting that individual node runners have the ability to change if they would like, but it’s safe to assume that nodes are going to be using this value of 1.0 as the default. This is something that Pocket has no control over.
If you could give some more detail about how you’re trying to construct the transaction in ether.js, and what method you’re trying to call on the smart contract, it should be easier to narrow down between the two above scenarios. If it’s 1, that’s something that can be addressed on the ether.js side, and if it’s 2, that’s something that would likely have to be addressed on the EVM/solidity side.