failed to send request to user worker: connection error: Connection reset by peer (os error 104)

hi! can't figure ourt what this error means and what I can do here

supabase functions serve --no-verify-jwt
Setting up Edge Functions runtime...
Serving functions on http://127.0.0.1:54321/functions/v1/<function-name>
serving the request with /home/deno/functions/auth
failed to send request to user worker: connection error: Connection reset by peer (os error 104)
InvalidWorkerResponse: user worker failed to respond
    at async Promise.all (index 1)
    at async UserWorker.fetch (ext:sb_user_workers/user_workers.js:64:19)
    at async Server.<anonymous> (file:///home/deno/main/index.ts:146:12)
    at async #respond (https://deno.land/std@0.182.0/http/server.ts:220:18) {
  name: "InvalidWorkerResponse"


import pg from 'pg';
import { drizzle } from 'drizzle-orm/postgres-js';
// import postgres from 'postgres';
import { user } from '../_shared/schema.ts';
import process from "node:process";
import express from 'express';

const { Pool } = pg;
const connectionString = ['url'];
const pool = new Pool({ connectionString });
const db = drizzle(pool);
const app = express();
app.use(express.json());

app.get('/auth', async (req, res) => {
  const allUsers = await db.select().from(user);
  res.json(allUsers);
});
  
app.post('/auths', async (req, res) => {
  const { name, email, role } = req.body;
  try {
    const newUser = await db.insert(user).values({ name, email, role }).returning();
    res.json(newUser);
  } catch (error) {
    res.status(500).send(error);
  }
});


it's also wierd how i do this and the functions aren't showing locally as well
Was this page helpful?