CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl-labs/express-error-handling

Production error handling for Express APIs — error middleware, async wrappers,

89

2.02x
Quality

86%

Does it follow best practices?

Impact

97%

2.02x

Average score across 4 eval scenarios

SecuritybySnyk

Passed

No known issues

Overview
Quality
Evals
Security
Files

task.mdevals/scenario-3/

Build a Task Management API

Problem/Feature Description

Build a REST API for a small team productivity tool using Express and TypeScript.

Data model:

  • Task: { id, title, description, status, assigneeEmail, createdAt }
  • Status must be one of: "todo", "in_progress", "done"

Endpoints:

  • GET /api/tasks -- list all tasks, optionally filter by ?status=todo query param
  • GET /api/tasks/:id -- get a single task
  • POST /api/tasks -- create a task (title required, status defaults to "todo")
  • PATCH /api/tasks/:id -- update task fields (validate status enum if provided)
  • DELETE /api/tasks/:id -- delete a task

Business rules:

  • Title must be a non-empty string, max 200 characters
  • If assigneeEmail is provided, it must contain an @ symbol
  • Cannot transition status from "done" back to "todo" (only "done" -> "in_progress" is allowed as a backward step)

Use in-memory storage. Include package.json with dependencies.

Output Specification

Produce:

  • src/server.ts -- server entry point
  • src/app.ts -- Express application setup
  • src/routes/tasks.ts -- route handlers
  • package.json -- with dependencies listed

You may create additional files for a well-organized codebase.

evals

tile.json