go-dojo
learn go · earn mastery
phase 1 · 1.3-error-testing

Error handling + table-driven tests

prereqs 1.2-types-structs0.4-errors-as-values
review intervals 3d 7d 21d 60d drills table-driven-test

The lesson for this task hasn't been written yet. The mastery criteria below is the shortest description of what you'll own when this task is green.

Mastery criteria

- Dispatcher returns typed errors (malformed JSON, unknown type); errors wrap with %w
- Table-driven tests cover every handler + every error path
- Writes raw testing.T tests BEFORE reaching for testify

Verify

Run from your go-dojo repo root:

go-dojo verify 1.3-error-testing

This runs the task's go test suite in exercises/phase-1/1.3-error-testing/, commits the attempt to .go-dojo/attempts/, and updates your mastery.