tursodatabase / libsql-client-ts

TypeScript/JavaScript client API for libSQL
https://docs.turso.tech/sdk/ts/quickstart
MIT License
290 stars 37 forks source link

error 500 from turso endpoint when running on AWS Lambda #199

Open yspreen opened 7 months ago

yspreen commented 7 months ago
TRPCClientError: request to https://somedb.turso.io/v2/pipeline failed, reason: write EPIPE
    at Function.from (/Users/user/Documents/proj/node_modules/@trpc/client/dist/TRPCClientError.js:28:20)
    at /Users/user/Documents/proj/node_modules/@trpc/client/dist/links/internals/createHTTPBatchLink.js:61:76
    at processTicksAndRejections (node:internal/process/task_queues:95:5) {
  meta: {
    response: Response {
      [Symbol(realm)]: null,
      [Symbol(state)]: [Object],
      [Symbol(headers)]: [HeadersList]
    },
    responseJSON: [ [Object] ]
  },
  shape: {
    message: 'request to https://somedb.turso.io/v2/pipeline failed, reason: write EPIPE',
    code: -32603,
    data: {
      code: 'INTERNAL_SERVER_ERROR',
      httpStatus: 500,
      stack: 'FetchError: request to https://somedb.turso.io/v2/pipeline failed, reason: write EPIPE\n' +
        '    at ClientRequest.<anonymous> (/var/task/lambda.js:7:306176)\n' +
        '    at ClientRequest.emit (node:events:518:28)\n' +
        '    at TLSSocket.socketErrorListener (node:_http_client:495:9)\n' +
        '    at TLSSocket.emit (node:events:518:28)\n' +
        '    at emitErrorNT (node:internal/streams/destroy:169:8)\n' +
        '    at emitErrorCloseNT (node:internal/streams/destroy:128:3)\n' +
        '    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)',
      path: 'getSession'
    }
  },
  data: {
    code: 'INTERNAL_SERVER_ERROR',
    httpStatus: 500,
    stack: 'FetchError: request to https://somedb.turso.io/v2/pipeline failed, reason: write EPIPE\n' +
      '    at ClientRequest.<anonymous> (/var/task/lambda.js:7:306176)\n' +
      '    at ClientRequest.emit (node:events:518:28)\n' +
      '    at TLSSocket.socketErrorListener (node:_http_client:495:9)\n' +
      '    at TLSSocket.emit (node:events:518:28)\n' +
      '    at emitErrorNT (node:internal/streams/destroy:169:8)\n' +
      '    at emitErrorCloseNT (node:internal/streams/destroy:128:3)\n' +
      '    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)',
    path: 'getSession'
  },
  [cause]: undefined
}
  "dependencies": {
    "@libsql/client": "^0.5.6",
    "@trpc/server": "^11.0.0-next.320",
    "drizzle-orm": "^0.30.6",
    "drizzle-zod": "^0.5.1"
  }
yspreen commented 7 months ago

happened once, the next request succeeded