vercel / next-learn

Learn Next.js Starter Code
https://next-learn-dashboard.vercel.sh/
MIT License
3.72k stars 1.9k forks source link

restcountries.eu API is no longer free/open #51

Closed aharbick closed 2 years ago

aharbick commented 3 years ago

This line https://github.com/vercel/next-learn/blob/master/seo/pages/index.js#L103

Causes this failure

FetchError: request to https://restcountries.eu/rest/v2/all failed, reason: Hostname/IP does not match certificate's altnames: Host: restcountries.eu. is not in the cert's altnames: DNS:shortener.secureserver.net, DNS:www.shortener.secureserver.net
    at ClientRequest.<anonymous> (/Users/aharbick/Sites/seo/nextjs-lighthouse/node_modules/node-fetch/lib/index.js:1461:11)
    at ClientRequest.emit (node:events:376:20)
    at TLSSocket.socketErrorListener (node:_http_client:474:9)
    at TLSSocket.emit (node:events:376:20)
    at emitErrorNT (node:internal/streams/destroy:188:8)
    at emitErrorCloseNT (node:internal/streams/destroy:153:3)
    at processTicksAndRejections (node:internal/process/task_queues:80:21) {
  type: 'system',
  errno: 'ERR_TLS_CERT_ALTNAME_INVALID',
  code: 'ERR_TLS_CERT_ALTNAME_INVALID'
}
leerob commented 2 years ago

Fixed https://github.com/vercel/next-learn/pull/53