How to solve product publishing errors with third party inventory?

Hello, I have a problem. I’m trying to publish and managing my product but there’s more than 100 styles and it will take a long time to publish it. So I’m using a third party inventory but when I’m trying to publish a product I always get an error saying “Cannot read properties of undefined (reading ‘headers’)” and "504 - “\r\n504 Gateway Time-out\r\n\r\n

504 Gateway Time-out

\r\n
nginx\r\n\r\n\r\n”.

I already confirm it with my third party customer service, but they said the problem was from the shopify server. Can someone help me?