Skip to content

Commit 65dedd1

Browse files
mromaszewiczclaude
andcommitted
feat: replace single error handler with three-callback pattern in strict gin template
Split the single ErrorHandlerFunc into three distinct callbacks to give callers control over error responses by category: - RequestErrorHandlerFunc: request parsing/binding errors (default 400) - HandlerErrorFunc: application handler errors (default 500) - ResponseErrorHandlerFunc: response serialization errors (default 500) This also fixes two bugs in the original template: - Missing multipart boundary now passes http.ErrMissingBoundary instead of a nil error - Unexpected response type now passes a descriptive error instead of nil Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 0e5ca22 commit 65dedd1

8 files changed

Lines changed: 331 additions & 130 deletions

File tree

internal/test/issues/issue-1093/api/child/child.gen.go

Lines changed: 34 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/test/issues/issue-1093/api/parent/parent.gen.go

Lines changed: 34 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/test/issues/issue-1208-1209/issue-multi-json.gen.go

Lines changed: 34 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/test/issues/issue-1212/pkg1/pkg1.gen.go

Lines changed: 34 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/test/issues/issue-1212/pkg2/pkg2.gen.go

Lines changed: 31 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/test/issues/issue-1298/issue1298.gen.go

Lines changed: 35 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)