DokployD
Dokploy2y ago
22 replies
stefanVDW

Issue making http call from application to external API

I have a Nuxt 3 app with a server route that is responsible for calling an external API: https://hacker-news.firebaseio.com/v0/item/${itemID}.json which works great locally and on render.com, but fails when deployed on dokploy (on hetzner cloud).

It seems to be an issue with establishing a TLS connection:

 bash
An error occurred while retrieving an individual story on the server
FetchError: [GET] "https://hacker-news.firebaseio.com/v0/item/41372017.json": <no response> fetch failed
...
    [cause]: Error: Client network socket disconnected before secure TLS connection was established
        at TLSSocket.onConnectEnd (node:_tls_wrap:1729:19)
        at TLSSocket.emit (node:events:532:35)
        at endReadableNT (node:internal/streams/readable:1696:12)
        at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
      code: 'ECONNRESET',
      path: undefined,
      host: 'hacker-news.firebaseio.com',
      port: 443,
      localAddress: null
    }
  }
}


Is there something that needs to be setup when I want to make calls to an external API from a service?
Was this page helpful?