Rocket.Chat's Community Open Call 🎤 Dec 15, 2021 Join us!

Error: ESOCKETTIMEDOUT at ClientRequest.<anonymous>

I am using a outgoing-webhook and actually the response takes more than 1 minute. Seems like the timeout is less than 1 minute. How can I solve this error?

at Object.onceWrapper (events.js:273:13)
at ClientRequest.emit (events.js:182:13)
at Socket.emitTimeout (_http_client.js:714:34)
at Object.onceWrapper (events.js:273:13)
at Socket.emit (events.js:182:13)
at Socket._onTimeout (net.js:447:8)
at ontimeout (timers.js:457:11)
at tryOnTimeout (timers.js:327:5)
at listOnTimeout (timers.js:301:5) code: ‘ESOCKETTIMEDOUT’, connect: false }

Let me see if I understand.

You are consuming an API and it’s taking too long to return, so the integration doesn’t work?

I am not sure you can change the webhook integration timeout right now. If that’s what you need, we can probably open up a feature request.

Hi there,
We can add the timeout in This can be added in app/integrations/server/lib/triggerHandler.js.
It worked for me. Thanks.

Oh, ok.

There’s always a way if you can edit the code :wink:

But it would be nice to have an option for that under the Advanced Settings for the integration.

1 Like