translateDomainError discarded web.HTTPError.Code, so v2 error bodies always read code 0 — losing the v1 contract the error docs key off. Override huma.NewError with a VikunjaErrorModel that adds a code field, so both the generated OpenAPI schema and runtime responses carry it. Domain errors with a numeric code now surface it (e.g. 8002 for a missing label, matching v1); errors without one omit it. |
||
|---|---|---|
| .. | ||
| v1 | ||
| v2 | ||