Error handling for Go HTTP servers — structured error responses, error wrapping,
88
81%
Does it follow best practices?
Impact
99%
1.80xAverage score across 5 eval scenarios
Passed
No known issues
A development team wants a simple task tracker backend. Build it using Go with the standard library (net/http).
Resources:
{ id, title, description, status, assignee, createdAt, updatedAt }todo, in_progress, doneEndpoints:
GET /api/tasks -- list all tasks, with optional query parameter ?status=todo to filterGET /api/tasks/{id} -- get a single taskPOST /api/tasks -- create a task (title required, status defaults to todo)PATCH /api/tasks/{id} -- update task fields (partial update)DELETE /api/tasks/{id} -- delete a taskPOST /api/tasks/{id}/assign -- assign a task to someone (body: { "assignee": "alice" })Use in-memory storage. Generate IDs using a counter or UUID.
Produce:
main.go -- server entry pointgo.mod -- module definitionYou may split across additional files as needed.