"internal error" calling .fetch on bound Durable Object

I'm getting this thrown when trying to call DO fetch. I think my worker is configured incorrectly.

My worker code is very simple:

async function handleAgentRequest(request, env) {
  const guid = env.GUID;
  const id = env.AGENT.idFromName(guid);
  const stub = env.AGENT.get(id);
  return await stub.fetch(request);
}

export default {
  async fetch(request, env, ctx) {
    try {
      return await handleAgentRequest(request, env);
    } catch (err) {
      console.warn(err.stack);
    }
  },
}


What are some things to check in my worker settings to debug this?
Was this page helpful?