Joint session with Vercel: How to build intelligent storefronts (May 15th)

GraphQL API "TypeError: terminated" error after infrastructure update

22 repliesLast updated: Dec 1, 2025

Hey, I'm getting the following error when trying to fetch data from the GraphQL API. It started erroring 2 days ago. Could this be related to the infrastructure update (https://www.sanity-status.com/ )? If so, when can we expect it to start working again?

 TypeError: terminated
     at Fetch.onAborted (node:internal/deps/undici/undici:10916:53)
     at Fetch.emit (node:events:518:28)
     at Fetch.emit (node:domain:488:12)
     at Fetch.terminate (node:internal/deps/undici/undici:10102:14)
     at Object.onError (node:internal/deps/undici/undici:11034:38)
     at Request.onError (/Users/<redacted>/node_modules/next/dist/compiled/undici/index.js:1:103010)
     at errorRequest (/Users/<redacted>/node_modules/next/dist/compiled/undici/index.js:1:83029)
     at TLSSocket.onSocketClose (/Users/<redacted>/node_modules/next/dist/compiled/undici/index.js:1:70729)
     at TLSSocket.emit (node:events:530:35)
     at TLSSocket.emit (node:domain:488:12) {
   [cause]: SocketError: other side closed
       at TLSSocket.onSocketEnd (/Users/<redacted>/node_modules/next/dist/compiled/undici/index.js:1:70251)
       at TLSSocket.emit (node:events:530:35)
       at TLSSocket.emit (node:domain:488:12)
       at endReadableNT (node:internal/streams/readable:1696:12)
       at processTicksAndRejections (node:internal/process/task_queues:82:21) {
     code: 'UND_ERR_SOCKET',
     socket: {
       localAddress: '192.168.88.182',
       localPort: 64602,
       remoteAddress: '34.111.181.219',
       remotePort: 443,
       remoteFamily: 'IPv4',
       timeout: undefined,
       bytesWritten: 3422,
       bytesRead: 73206
     }
   }
 }
AI Update

I can see you're experiencing a network-level error (UND_ERR_SOCKET with "other side closed") when trying to fetch from Sanity's GraphQL API. This type of error indicates the connection is being terminated unexpectedly, which can have several causes.

Understanding the error:

The TypeError: terminated with the underlying SocketError: other side closed from undici (Node's HTTP client) means your request started but the connection was closed before completing. This is a network/connection issue rather than a GraphQL query problem.

Possible causes:

Immediate troubleshooting steps:

If the issue persists:

Since this started 2 days ago and involves connection termination, it could be infrastructure-related. I'd recommend:

The error you're seeing is at the network/transport layer rather than the GraphQL application layer, which suggests either infrastructure issues or network connectivity problems between your application and Sanity's API servers. The status page will show if there's a known incident, but if everything appears operational there and you're still experiencing issues, support can investigate your specific project.

Show original thread
22 replies

Was this answer helpful?

Sanity – Build the way you think, not the way your CMS thinks

Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.

Related contributions