whoamiW
Convex Community3y ago
2 replies
whoami

Internal error for getting blob from storageId in node runtime

I was trying langchain/document_loaders with javascript runtime, that didn't work out so I turned myself to the node runtime, this time I got

Transient error during storage get url: {"code":"InternalServerError","message":"Your request couldn't be completed. Try again later."}
  at async get [as get] (../node_modules/.pnpm/convex@0.14.1_biqbaboplfbrettd7655fr4n2y/node_modules/convex/src/server/impl/storage_impl.ts:68:8)
  at async handler (../convex/action.ts:16:16)
  at async invokeAction (../node_modules/.pnpm/convex@0.14.1_biqbaboplfbrettd7655fr4n2y/node_modules/convex/src/server/impl/registration_impl.ts:249:14)


"use node"

import { v } from "convex/values"
import { PDFLoader } from "langchain/document_loaders"

import { action } from "./_generated/server"

export const save = action({
  args: {
    storageId: v.string(),
  },
  handler: async ({ runMutation, storage }, { storageId }) => {
    console.log("storageId", storageId)
    
    // I think this is where things go wrong
    const blob = await storage.get(storageId)
    ...
  },
})
Was this page helpful?