Error inserting warehouse operation: error: duplicate key value violates unique constraint "production_work_orders_production_order_id_sequence_key"
    at /home/runner/workspace/node_modules/pg-pool/index.js:45:11
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async <anonymous> (/home/runner/workspace/server/routes/production/orders.ts:1259:7) {
  length: 324,
  severity: 'ERROR',
  code: '23505',
  detail: 'Key (production_order_id, sequence)=(1078, 5) already exists.',
  hint: undefined,
  position: undefined,
  internalPosition: undefined,
  internalQuery: undefined,
  where: undefined,
  schema: 'production',
  table: 'production_work_orders',
  column: undefined,
  dataType: undefined,
  constraint: 'production_work_orders_production_order_id_sequence_key',
  file: 'nbtinsert.c',
  line: '666',
  routine: '_bt_check_unique'
}
10:24:32 AM [express] POST /api/production/orders/1078/insert-warehouse-operation 500 in 185ms :: {"m…
10:24:32 AM [express] GET /api/production/orders/1078/warehouse-stays/active 200 in 147ms :: []
Error inserting warehouse operation: error: duplicate key value violates unique constraint "production_work_orders_production_order_id_sequence_key"
    at /home/runner/workspace/node_modules/pg-pool/index.js:45:11
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async <anonymous> (/home/runner/workspace/server/routes/production/orders.ts:1259:7) {
  length: 324,
  severity: 'ERROR',
  code: '23505',
  detail: 'Key (production_order_id, sequence)=(1078, 5) already exists.',
  hint: undefined,
  position: undefined,
  internalPosition: undefined,
  internalQuery: undefined,
  where: undefined,
  schema: 'production',
  table: 'production_work_orders',
  column: undefined,
  dataType: undefined,
  constraint: 'production_work_orders_production_order_id_sequence_key',
  file: 'nbtinsert.c',
  line: '666',
  routine: '_bt_check_unique'
}