Code Room
Code reviewMediumcr-g108
Subject Error handlingLevel Mid–Senior~25 minCommon in Concurrency · Code quality & review interviewsIndustries Software development

Question

Review this JavaScript request handler doing background work.

What a strong answer looks like

Separate real bugs from style. Rank issues by severity, point at the root cause rather than the symptom, and suggest a concrete fix — specific and kind.

Talk through your review
Code to reviewjs
app.post("/import", (req, res) => {  res.status(202).json({ status: "accepted" });  processImport(req.body).then((r) => {    log.info("import done", r);  });}); async function processImport(body) {  const rows = await parse(body);  await db.bulkInsert(rows);  return rows.length;}
Run or narrate your approach, then ask the coach.