
      
    group_created_at: '2025-07-22 11:09:08.977622',

    group_updated_at: '2025-07-28 18:25:49.452346'

  }

]

✅ Processed 1 groups for user _1753266816257

🔐 API /api/users - Returning: { isArray: true, length: 7, totalGroups: 6 }

GET /api/users 304 in 81ms

HEAD /api/health 200 in 1ms

🔍 getUserWithGroups called for user: admin_local

🔍 Querying user_groups for user: admin_local

🔍 Found 0 group assignments for user admin_local

🔍 Raw query result: []

✅ Processed 0 groups for user admin_local

🔍 getUserWithGroups called for user: admin_local

🔍 Querying user_groups for user: admin_local

🔍 Found 0 group assignments for user admin_local

🔍 Raw query result: []

✅ Processed 0 groups for user admin_local

🔍 POST /api/users - Creating new user

📥 Request body: {

  "email": "",

  "firstName": "",

  "lastName": "",

  "username": "ff292m",

  "password": "ff292m",

  "role": "manager",

  "id": "_1754942821925"

}

🔍 getUserWithGroups called for user: admin_local

🔍 Querying user_groups for user: admin_local

🔍 Found 0 group assignments for user admin_local

🔍 Raw query result: []

✅ Processed 0 groups for user admin_local

🔍 Parsing user data...

✅ User data parsed successfully

🔒 Hashing password...

✅ Password hashed successfully

🔍 Generated user ID: _1754942821925

🔍 Creating user in database...

🔍 Storage createUser called with: ff292m

❌ Storage createUser error: error: duplicate key value violates unique constraint "users_email_key"

    at /app/node_modules/pg-pool/index.js:45:11

    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

    at async file:///app/node_modules/drizzle-orm/node-postgres/session.js:83:22

    at async DatabaseStorage.createUser (file:///app/dist/index.js:989:26)

    at async file:///app/dist/index.js:3993:23 {

  length: 192,

  severity: 'ERROR',

  code: '23505',

  detail: 'Key (email)=() already exists.',

  hint: undefined,

  position: undefined,

  internalPosition: undefined,

  internalQuery: undefined,

  where: undefined,

  schema: 'public',

  table: 'users',

  column: undefined,

  dataType: undefined,

  constraint: 'users_email_key',

  file: 'nbtinsert.c',

  line: '664',

  routine: '_bt_check_unique'

}

❌ Storage error code: 23505

❌ Storage error constraint: users_email_key

❌ Error creating user: error: duplicate key value violates unique constraint "users_email_key"

    at /app/node_modules/pg-pool/index.js:45:11

    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

    at async file:///app/node_modules/drizzle-orm/node-postgres/session.js:83:22

    at async DatabaseStorage.createUser (file:///app/dist/index.js:989:26)

    at async file:///app/dist/index.js:3993:23 {

  length: 192,

  severity: 'ERROR',

  code: '23505',

  detail: 'Key (email)=() already exists.',

  hint: undefined,

  position: undefined,

  internalPosition: undefined,

  internalQuery: undefined,

  where: undefined,

  schema: 'public',

  table: 'users',

  column: undefined,

  dataType: undefined,

  constraint: 'users_email_key',

  file: 'nbtinsert.c',

  line: '664',

  routine: '_bt_check_unique'

}

❌ Error type: DatabaseError

❌ Error code: 23505

❌ Error constraint: users_email_key

❌ Error stack: error: duplicate key value violates unique constraint "users_email_key"

    at /app/node_modules/pg-pool/index.js:45:11

    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

    at async file:///app/node_modules/drizzle-orm/node-postgres/session.js:83:22

    at async DatabaseStorage.createUser (file:///app/dist/index.js:989:26)

    at async file:///app/dist/index.js:3993:23

POST /api/users 409 in 109ms